--- /dev/null
+# Doxyfile 1.6.3
+
+# 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 = N9Profil
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = /scratchbox/users/bzouk/home/bzouk/N9Profil/N9Profil/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, Esperanto, 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, Ukrainian, and Vietnamese.
+
+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 = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = 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. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+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 = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# 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 = NO
+
+# 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 = NO
+
+# 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 FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# 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_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = 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 = 27
+
+# 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 <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> 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 = /scratchbox/users/bzouk/home/bzouk/N9Profil/N9Profil
+
+# 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 = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.d \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.vhd \
+ *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. 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 <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. 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 = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# 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 = NO
+
+# 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 = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# 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 = org.doxygen.Project
+
+# 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
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+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 =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# 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 YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# 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
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# 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.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+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
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = 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 = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# 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 = 7
+
+# 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 = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT 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
--- /dev/null
+ Copyright 2010 Jakub Šplíchal. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ of conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY JAKUB ŠPLÍCHAL ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JAKUB ŠPLÍCHAL OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of Jakub Šplíchal.
--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-02-17T11:50:47
+# -------------------------------------------------
+# Obsahuje Qt >= 4.6.* ?
+contains(QT_VERSION, ^4\.[0-6]\.*) {
+ message("Use new version of QT, you are using: $$QT_VERSION .")
+ error("Use Qt 4.6.*")
+}
+QMAKE_CXXFLAGS_RELEASE += -O2.
+
+# potřebuji přidat maemo5
+QT += xml \
+ xmlpatterns \
+ dbus \
+ maemo5 \
+ network
+
+# ted bude debug a potřebuji ještě pkgconfig
+# http://doc.trolltech.com/4.6/qmake-project-files.html#configuration-features
+CONFIG += debug \
+ link_pkgconfig \
+ qt \
+ mobility
+MOBILITY += systeminfo
+
+# pro d-bus v libprofile
+PKGCONFIG += dbus-1
+
+# include pro libprofile.h and cal backend
+INCLUDEPATH += ../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/include/profiled \
+ ../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/include/calendar-backend
+
+# lib libprofile
+LIBS += ../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/lib/libprofile.so \
+ ../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/lib/libcalendar_backend.so
+TARGET = N9Profil
+TEMPLATE = app
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ controlclass.cpp \
+ profil.cpp \
+ profiledb.cpp \
+ profiledeamon.cpp \
+ profildialog.cpp \
+ timeprofile.cpp \
+ timedprofildialog.cpp \
+ calendatprofile.cpp \
+ calendar.cpp \
+ event.cpp \
+ calendarprofilesdialog.cpp \
+ calendarsetprofiledialog.cpp \
+ networkdialogdialog.cpp \
+ networkprofile.cpp \
+ networkdialogedit.cpp \
+ telephonenumprofile.cpp \
+ telenumdialog.cpp \
+ telephonenumnewruledialog.cpp \
+ profilesmanager.cpp \
+ soundfilesmanager.cpp \
+ rulesmanager.cpp
+HEADERS += mainwindow.h \
+ controlclass.h \
+ profil.h \
+ profiledb.h \
+ profiledeamon.h \
+ profildialog.h \
+ timeprofile.h \
+ timedprofildialog.h \
+ calendatprofile.h \
+ calendar.h \
+ event.h \
+ calendarprofilesdialog.h \
+ calendarsetprofiledialog.h \
+ networkdialogdialog.h \
+ networkprofile.h \
+ networkdialogedit.h \
+ telephonenumprofile.h \
+ telenumdialog.h \
+ telephonenumnewruledialog.h \
+ profilesmanager.h \
+ soundfilesmanager.h \
+ rulesmanager.h
+FORMS += mainwindow.ui \
+ profildialog.ui \
+ timedprofildialog.ui \
+ calendarprofilesdialog.ui \
+ calendarsetprofiledialog.ui \
+ networkdialogdialog.ui \
+ networkdialogedit.ui \
+ telenumdialog.ui \
+ telephonenumnewruledialog.ui
+
+# čeština a nastavení na UTF-8
+TRANSLATIONS = N9Profil_cs_CZ.ts
+CODECFORTR = UTF-8
+RESOURCES += rcc.qrc
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="cs_CZ">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name>CalendarProfile</name>
+ <message>
+ <location filename="calendatprofile.cpp" line="234"/>
+ <source>Name od calendars</source>
+ <translation>Jméno kalendáře</translation>
+ </message>
+ <message>
+ <location filename="calendatprofile.cpp" line="301"/>
+ <source>Name of profile</source>
+ <translation>Jméno profilu</translation>
+ </message>
+ <message>
+ <location filename="calendatprofile.cpp" line="301"/>
+ <source>Words</source>
+ <translation>Slova</translation>
+ </message>
+ <message>
+ <location filename="calendatprofile.cpp" line="301"/>
+ <source>Priority</source>
+ <translation>Priorita</translation>
+ </message>
+</context>
+<context>
+ <name>CalendarProfilesDialog</name>
+ <message>
+ <location filename="calendarprofilesdialog.ui" line="14"/>
+ <source>Calendar and rules</source>
+ <translation>Kalendář a pravidla</translation>
+ </message>
+ <message>
+ <location filename="calendarprofilesdialog.ui" line="31"/>
+ <source>Allow calendars</source>
+ <translation>Povolit kalendáře</translation>
+ </message>
+ <message>
+ <location filename="calendarprofilesdialog.ui" line="49"/>
+ <source>Set profiles rules</source>
+ <translation>Pravidla</translation>
+ </message>
+ <message>
+ <location filename="calendarprofilesdialog.cpp" line="17"/>
+ <source>Edit profiles and calendars</source>
+ <translation>Upravit profily a kalendáře</translation>
+ </message>
+</context>
+<context>
+ <name>CalendarSetProfileDialog</name>
+ <message>
+ <location filename="calendarsetprofiledialog.ui" line="14"/>
+ <source>Edit profile rulez</source>
+ <translation>Upravit pravidla</translation>
+ </message>
+ <message>
+ <location filename="calendarsetprofiledialog.ui" line="31"/>
+ <source>Save</source>
+ <translation>Uložit</translation>
+ </message>
+ <message>
+ <location filename="calendarsetprofiledialog.ui" line="85"/>
+ <source>TextLabel</source>
+ <translation>text</translation>
+ </message>
+</context>
+<context>
+ <name>CalendatProfile</name>
+ <message>
+ <source>Name od calendars</source>
+ <translation type="obsolete">Jméno kalendáře</translation>
+ </message>
+ <message>
+ <source>Name of profile</source>
+ <translation type="obsolete">Jméno profilu</translation>
+ </message>
+ <message>
+ <source>Words</source>
+ <translation type="obsolete">Slova</translation>
+ </message>
+ <message>
+ <source>Priority</source>
+ <translation type="obsolete">Priorita</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="mainwindow.ui" line="14"/>
+ <source>N9Profile</source>
+ <translation>N9Profile</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="46"/>
+ <source>New profile</source>
+ <translation>Nový profil</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="53"/>
+ <source>Phone number rules</source>
+ <translation>Pravidla pro čísla</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="74"/>
+ <source>Profiles</source>
+ <translation>Profily</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="89"/>
+ <source>Menu</source>
+ <translation>Menu</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="108"/>
+ <source>About</source>
+ <translation>O programu</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="113"/>
+ <source>AboutQT</source>
+ <translation>O Qt</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.ui" line="118"/>
+ <source>Exit</source>
+ <translation>Konec</translation>
+ </message>
+ <message>
+ <source>Current profile is: </source>
+ <translation type="obsolete">Profl je ted: </translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="65"/>
+ <source>Default profile</source>
+ <translation>Základní profil</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="75"/>
+ <source>Timed profile</source>
+ <translation>Časový profil</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="81"/>
+ <source>Calendar profiles</source>
+ <translation>Profil z kalendáře</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="87"/>
+ <source>Network profile</source>
+ <translation>Síťový profil</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="174"/>
+ <source>Delete or modify profile?</source>
+ <translation>Smazat nebo upravit profil?</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="177"/>
+ <source>Delete</source>
+ <translation>Zmazat</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="178"/>
+ <source>Modify</source>
+ <translation>Upravit</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="184"/>
+ <source>You cannot delete deafult profile</source>
+ <translation>Nemůžete smazat základní profil</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="323"/>
+ <source>Application</source>
+ <translation>N9Profile ukončit</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="324"/>
+ <source>Program will end.
+Do you want to quit?</source>
+ <translation>Program skončí. Opravdu chcete ukončit?</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="383"/>
+ <source>This program can create mobile profiles and set them. </source>
+ <translation>Program může vytvářet profily a nastavovat je. </translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="384"/>
+ <source>Program will change only general profil in N900. </source>
+ <translation>Program mění pouze general profil v N900. </translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="385"/>
+ <source>When you first start N9Profil it will create two profile from N900, general a silent. </source>
+ <translation>Po prvním způštění se vytvoří dva profily, general a silent z vašeho mobilu. </translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="386"/>
+ <source>You can set default profile, timed profile for </source>
+ <translation>Můžete nastavit různé druhy profilů pro</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="387"/>
+ <source>period of time or you can set profiles based on desctriptions </source>
+ <translation>sít, na určitý čas a na základě popisu </translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="388"/>
+ <source>in events in calendar. </source>
+ <translation>udáslotí v kalendáři atd.</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="389"/>
+ <source>Timed profile have bigger priority, then calendar and calendar then default profile. </source>
+ <translation>Časoví profil má největší proioritu, pak pro sít, kalendář a základní, ale pro telefoní čísla je použit dle pravidla.</translation>
+ </message>
+ <message>
+ <location filename="mainwindow.cpp" line="390"/>
+ <source>About N9Profil</source>
+ <translation>O N9Profil</translation>
+ </message>
+</context>
+<context>
+ <name>NetWorkDialogEdit</name>
+ <message>
+ <location filename="networkdialogedit.ui" line="14"/>
+ <source>Dialog</source>
+ <translation>dialog</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.ui" line="27"/>
+ <source>Save</source>
+ <translation>Uložit</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.ui" line="34"/>
+ <source>Name</source>
+ <translation>Jméno</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.ui" line="48"/>
+ <source>Name of rule</source>
+ <translation>Jméno pravidla</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.cpp" line="21"/>
+ <source>Set profile forNetwork</source>
+ <translation>Nastavit profil pro síť</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.cpp" line="59"/>
+ <source>Choose profile for Network:</source>
+ <translation>Vybrat profil pro síť: </translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.cpp" line="121"/>
+ <source>Select profile for network</source>
+ <translation>Vyberte profil pro síť</translation>
+ </message>
+ <message>
+ <location filename="networkdialogedit.cpp" line="127"/>
+ <source>Please fill name</source>
+ <translation>Vyplňte jméno prosím</translation>
+ </message>
+ <message>
+ <source>One word name please</source>
+ <translation type="obsolete">Pouze jedno slovo</translation>
+ </message>
+</context>
+<context>
+ <name>NetWorkdialogDialog</name>
+ <message>
+ <location filename="networkdialogdialog.ui" line="14"/>
+ <source>Dialog</source>
+ <translation>dialog</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="51"/>
+ <source>Name of wifi network</source>
+ <translation>Jméno wifi sítě</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="69"/>
+ <location filename="networkdialogdialog.ui" line="105"/>
+ <source>TextLabel</source>
+ <translation>text</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="87"/>
+ <location filename="networkdialogdialog.ui" line="128"/>
+ <source>Id location</source>
+ <translation>ID lokace</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="131"/>
+ <location filename="networkdialogdialog.ui" line="146"/>
+ <source>buttonGroup</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="143"/>
+ <source>WiFi name</source>
+ <translation>Jméno WiFi</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.ui" line="160"/>
+ <source>Create new rule</source>
+ <translation>Vytvořit pravidlo</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="23"/>
+ <source>Network profile</source>
+ <translation>Síťový profil</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="100"/>
+ <source>Phone not connected</source>
+ <translation>Mobil není připojen</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="108"/>
+ <source>Wifi not connected</source>
+ <translation>WiFI není připojeno</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="125"/>
+ <source>Not connedted to wifi</source>
+ <translation>Nejste připojen k WiFi</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="131"/>
+ <source>Mobile not connected</source>
+ <translation>Mobil není připojen</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="137"/>
+ <source>This rule for wifi exists</source>
+ <translation>Toto pravidlo pro wifi existuje</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="143"/>
+ <source>This rule for location exists</source>
+ <translation>Toto pravidlo pro lokaci existuje</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="154"/>
+ <source>New location rule for: </source>
+ <translation>Pravidlo pro lokaci je: </translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="175"/>
+ <location filename="networkdialogdialog.cpp" line="201"/>
+ <source>This rule exist</source>
+ <translation>Toto již existuje</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="180"/>
+ <source>New WiFi rule for: </source>
+ <translation>Nové pravidlo pro WiFI: </translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="223"/>
+ <location filename="networkdialogdialog.cpp" line="277"/>
+ <source>Delete or modify profile?</source>
+ <translation>Smazat nebo upravit pravidlo?</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="226"/>
+ <location filename="networkdialogdialog.cpp" line="280"/>
+ <source>Delete</source>
+ <translation>Smazat</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="227"/>
+ <location filename="networkdialogdialog.cpp" line="281"/>
+ <source>Modify</source>
+ <translation>Upravit</translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="239"/>
+ <source>Change profile for location: </source>
+ <translation>Změnit pravidlo pro lokaci: </translation>
+ </message>
+ <message>
+ <location filename="networkdialogdialog.cpp" line="292"/>
+ <source>Change profile for Wifi: </source>
+ <translation>Změnit pravidlo pro WiFi: </translation>
+ </message>
+</context>
+<context>
+ <name>ProfilDialog</name>
+ <message>
+ <location filename="profildialog.ui" line="14"/>
+ <source>Dialog</source>
+ <translation>dialof</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="22"/>
+ <source>Save</source>
+ <translation>Uložit</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="29"/>
+ <source>New tone</source>
+ <translation>Nový zvuk</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="58"/>
+ <source>Profile</source>
+ <translation>Jméno Profilu</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="73"/>
+ <source>Vibration Enabled</source>
+ <translation>Vibrace povoleny</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="85"/>
+ <source>SMS: 0</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="107"/>
+ <source>IM: 0</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="129"/>
+ <source>E-mail: 0 </source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="173"/>
+ <source>Ringing:0</source>
+ <translation>Zvonění: 0</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="182"/>
+ <location filename="profildialog.ui" line="240"/>
+ <location filename="profildialog.ui" line="286"/>
+ <source>Off</source>
+ <translation>Vypnuto</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="185"/>
+ <location filename="profildialog.ui" line="195"/>
+ <location filename="profildialog.ui" line="205"/>
+ <source>buttonGroup_system</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="192"/>
+ <location filename="profildialog.ui" line="250"/>
+ <location filename="profildialog.ui" line="296"/>
+ <source>Level 1</source>
+ <translation>uroveň 1</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="202"/>
+ <location filename="profildialog.ui" line="260"/>
+ <location filename="profildialog.ui" line="306"/>
+ <source>Level 2</source>
+ <translation>uroveň 2</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="219"/>
+ <source>System sound</source>
+ <translation>Systémové zvuky</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="231"/>
+ <source>Keyboard sounds</source>
+ <translation>Zvuky klávesnice</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="243"/>
+ <location filename="profildialog.ui" line="253"/>
+ <location filename="profildialog.ui" line="263"/>
+ <source>buttonGroup_keyboard</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="277"/>
+ <source>Screen sounds</source>
+ <translation>Zvuky displeje</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="289"/>
+ <location filename="profildialog.ui" line="299"/>
+ <location filename="profildialog.ui" line="309"/>
+ <source>buttonGroup_screen</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="323"/>
+ <source>Calendar Alarm Enabled</source>
+ <translation>Povolit alarm kalendáře</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="335"/>
+ <source>Clock Alarm Enabled</source>
+ <translation>Povolit alarm hodin</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="347"/>
+ <source>Ringing type</source>
+ <translation>Typ zvonění</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="356"/>
+ <source>Ringing</source>
+ <translation>Zvoní</translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="359"/>
+ <location filename="profildialog.ui" line="369"/>
+ <source>buttonGroup_ringing</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="profildialog.ui" line="366"/>
+ <source>Silent</source>
+ <translation>Tichý</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="36"/>
+ <source>New profile</source>
+ <translation>Nový profil</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="43"/>
+ <source>Edit profile</source>
+ <translation>Upravit profil</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="76"/>
+ <source>Ringing tone</source>
+ <translation>Vyzváněcí tón</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="89"/>
+ <source>SMS tone</source>
+ <translation>Upozornění na SMS</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="102"/>
+ <source>IM tone</source>
+ <translation>Tón IM zprávy</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="115"/>
+ <source>E-mail tone</source>
+ <translation>Upozornění na E-Mail</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="184"/>
+ <source>Profile must have name</source>
+ <translation>Profil můsí mít jméno</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="190"/>
+ <source>This profile elready exist</source>
+ <translation>Tento profil již existuje</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="197"/>
+ <source>One word name please</source>
+ <translation>Pouze jedno slovo v názvu</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="203"/>
+ <source>You can't start name with digit</source>
+ <oldsource>You can start name with digit</oldsource>
+ <translation>Jméno nemůže začínat číslem</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="210"/>
+ <source>Select ringtone for mobile</source>
+ <translation>Vyberte melodii pro telefón</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="217"/>
+ <source>Select ringtone for SMS</source>
+ <translation>Vyberte melodii pro SMS</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="224"/>
+ <source>Select ringtone for IM</source>
+ <translation>Vyberte melodii pro IM</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="231"/>
+ <source>Select ringtone for E-mail</source>
+ <translation>Vyberte melodii pro E-mail</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="381"/>
+ <source>Choose sound file</source>
+ <translation>Vyberte melodii</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="381"/>
+ <source>Sound files (*.wav *.mp3 *.AAC *.eAAC* *.acc *.wma *.m4a)</source>
+ <translation>Zvukové soubory (*.wav *.mp3 *.AAC *.eAAC* *.acc *.wma *.m4a)</translation>
+ </message>
+ <message>
+ <location filename="profildialog.cpp" line="416"/>
+ <source>Ringing:</source>
+ <translation>Zvonění:</translation>
+ </message>
+</context>
+<context>
+ <name>ProfileDB</name>
+ <message>
+ <source>Name</source>
+ <translation type="obsolete">Jméno</translation>
+ </message>
+ <message>
+ <source>Id location</source>
+ <translation type="obsolete">ID lokace</translation>
+ </message>
+ <message>
+ <source>Profile</source>
+ <translation type="obsolete">Profil</translation>
+ </message>
+ <message>
+ <source>Wifi name</source>
+ <translation type="obsolete">Jméno WiFi</translation>
+ </message>
+ <message>
+ <source>Telephone</source>
+ <translation type="obsolete">Číslo</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="controlclass.cpp" line="186"/>
+ <source>Timer profile: </source>
+ <translation>Časový profil:</translation>
+ </message>
+ <message>
+ <location filename="controlclass.cpp" line="197"/>
+ <source>Network profile: </source>
+ <translation>Síťový profil:</translation>
+ </message>
+ <message>
+ <location filename="controlclass.cpp" line="208"/>
+ <source>Calendar profile: </source>
+ <translation>Profil z kalendáře:</translation>
+ </message>
+ <message>
+ <location filename="controlclass.cpp" line="217"/>
+ <source>Default profile: </source>
+ <translation>Základní profil:</translation>
+ </message>
+</context>
+<context>
+ <name>RulesManager</name>
+ <message>
+ <location filename="rulesmanager.cpp" line="55"/>
+ <location filename="rulesmanager.cpp" line="59"/>
+ <location filename="rulesmanager.cpp" line="63"/>
+ <source>Name</source>
+ <translation>Jméno</translation>
+ </message>
+ <message>
+ <location filename="rulesmanager.cpp" line="55"/>
+ <source>Id location</source>
+ <translation>ID lokace</translation>
+ </message>
+ <message>
+ <location filename="rulesmanager.cpp" line="55"/>
+ <location filename="rulesmanager.cpp" line="59"/>
+ <location filename="rulesmanager.cpp" line="63"/>
+ <source>Profile</source>
+ <translation>Profil</translation>
+ </message>
+ <message>
+ <location filename="rulesmanager.cpp" line="59"/>
+ <source>Wifi name</source>
+ <translation>Jméno WiFi</translation>
+ </message>
+ <message>
+ <location filename="rulesmanager.cpp" line="63"/>
+ <source>Telephone</source>
+ <translation>Číslo</translation>
+ </message>
+</context>
+<context>
+ <name>TeleNumDialog</name>
+ <message>
+ <location filename="telenumdialog.ui" line="14"/>
+ <source>New telephone number rule</source>
+ <translation>Nové telefonní pravidlo</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.ui" line="36"/>
+ <source>Add new telephone number</source>
+ <translation>Přidat nové telefonní číslo</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.cpp" line="74"/>
+ <source>New telephone rule</source>
+ <translation>Nové telefonní pravidlo</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.cpp" line="116"/>
+ <source>Delete or modify number?</source>
+ <translation>Smazat nebo upravit?</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.cpp" line="119"/>
+ <source>Delete</source>
+ <translation>Smazat</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.cpp" line="120"/>
+ <source>Modify</source>
+ <translation>Upravit</translation>
+ </message>
+ <message>
+ <location filename="telenumdialog.cpp" line="132"/>
+ <source>Change profile for number: </source>
+ <translation>Upravit profil pro číslo: </translation>
+ </message>
+</context>
+<context>
+ <name>TelePhoneNumNewRuleDialog</name>
+ <message>
+ <location filename="telephonenumnewruledialog.ui" line="19"/>
+ <source>Rule for number</source>
+ <translation>Pravidlo pro číslo</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.ui" line="28"/>
+ <source>Text</source>
+ <translation>Text</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.ui" line="35"/>
+ <source>Name</source>
+ <translation>Jméno</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.ui" line="42"/>
+ <source>Telephone Number</source>
+ <translation>Telefonní číslo</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.ui" line="55"/>
+ <source>Save</source>
+ <translation>Uložit</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="42"/>
+ <source>Choose profile for Number:</source>
+ <translation>Vyberte profil pro číslo: </translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="147"/>
+ <source>Select profile for number</source>
+ <translation>Vyberte profil pro číslo</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="153"/>
+ <source>Please fill name</source>
+ <translation>Vyplňte jméno</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="172"/>
+ <source>This rule for number already exists</source>
+ <translation>Toto pravidlo pro číslo již existuje</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="176"/>
+ <location filename="telephonenumnewruledialog.cpp" line="180"/>
+ <source>Set number in format : +XXXXXXXXXXXX</source>
+ <translation>Zadejte číslo ve formátu: +XXXXXXXXXXXX</translation>
+ </message>
+ <message>
+ <source>One word name please</source>
+ <translation type="obsolete">Pouze jedno slovo prosím</translation>
+ </message>
+ <message>
+ <location filename="telephonenumnewruledialog.cpp" line="159"/>
+ <source>One number please</source>
+ <translation>Pouze jedno číslo prosím</translation>
+ </message>
+ <message>
+ <source>Set number in format : +420XXXXXXXXX</source>
+ <translation type="obsolete">Prosím číslo ve formátu: +420XXXXXXXXX</translation>
+ </message>
+</context>
+<context>
+ <name>TimedProfilDialog</name>
+ <message>
+ <location filename="timedprofildialog.cpp" line="31"/>
+ <location filename="timedprofildialog.cpp" line="56"/>
+ <source>Name of profile</source>
+ <translation>Jméno profilu</translation>
+ </message>
+ <message>
+ <location filename="timedprofildialog.cpp" line="38"/>
+ <source>Time</source>
+ <translation>Čas</translation>
+ </message>
+ <message>
+ <location filename="timedprofildialog.cpp" line="61"/>
+ <source>Select time</source>
+ <translation>Vyberte čas</translation>
+ </message>
+ <message>
+ <location filename="timedprofildialog.cpp" line="84"/>
+ <source>Select profile</source>
+ <translation>Vyberte profil prosím</translation>
+ </message>
+</context>
+<context>
+ <name>TimedprofilDialog</name>
+ <message>
+ <location filename="timedprofildialog.ui" line="14"/>
+ <source>Set timed profile</source>
+ <translation>Nastavit časoví profil</translation>
+ </message>
+ <message>
+ <location filename="timedprofildialog.ui" line="20"/>
+ <source>Save</source>
+ <translation>Uložit</translation>
+ </message>
+ <message>
+ <source>Name of profile</source>
+ <translation type="obsolete">Jméno profilu</translation>
+ </message>
+ <message>
+ <source>Time</source>
+ <translation type="obsolete">Čas</translation>
+ </message>
+ <message>
+ <source>Select time</source>
+ <translation type="obsolete">Vyberte čas</translation>
+ </message>
+ <message>
+ <source>Select profile</source>
+ <translation type="obsolete">Vyberte profil prosím</translation>
+ </message>
+</context>
+</TS>
--- /dev/null
+Toto je Readme pro program N9Profile pro N900
+-------------------------------------------------------------------
+Copyright (C) 2010 Jakub Šplíchal, <jakub.bzouk@gmail.com>
+Git: http://gitorious.org/n9profile
+
+1::) Co to je?
+---------------------------------------------------------------------
+Program slouží k nastavování vytváření a nastavení profilů pro
+mobil N900 se systémem Maemo 5.
+
+2::) Překlad
+-------------------------------------------------------------------
+Pro překlad je potřeba nástroj scratchbox http://www.forum.nokia.com/info/sw.nokia.com/id/c05693a1-265c-4c7f-a389-fc227db4c465/Maemo_5_SDK.html
+
+Spuštění aplikace ve scratchbox pro cíl FREMANTLE_X86:
+1. je potřeba v konzoli host systému spustit příkaz Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb
+
+2. Spustit dvě konzole a přihlasit se do scratchbox zapomocí příkazu /scratchbox/login a mít nastavený cíl FREMANTLE_X86 (zapomocí sb-menu příkazu)
+v 1. konzoli spustit příkazy
+ export DISPLAY=:2
+ af-sb-init.sh start
+a v druhé konzoli v adresáři se zdrojovými kódy aplikace (/n9profil-0.1/src/ spustit.
+qmake
+make
+run-standalone.sh ./N9Profile
+
+3::) Pro spuštění na N900
+stačí aplikaci přeložit pro ARM (ve scratchbox se přepíná cíl překladů pomocí sb-menu)
+Přeložit a nahrát aplikaci do HOME složky na mobilu a spustit pomocí run-standalone.sh ./N9Profile
+
+Instalační balíček deb:
+Pro vytvoření deb balíčku stačí spustit příkaz dpkg-buildpackage -sa -rfakeroot -kvas.email@email.com ve složce n9profil-0.1.
+
+
+3. Závislosti na knihovnách
+-------------------------------------------------------------------
+3::)
+Qt4.6.2
+- ve scratchbox stačí fakeroot apt-get install libqt4-maemo5-dev
+- pro nové knihovny stačí pouze fakeroot apt-get install libqt4-dev (pro Maemo PR 1.2)
+- je možné že při spuštění příkazu qmake bash nenalezne v PATH
+ stačí přidat knihovny a bin do path
+ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/qt4-maemo5/lib
+ - PATH=$PATH:/opt/qt4-maemo5/bin
+
+Knihovna pro nastavování profilů
+- fakeroot apt-get install libprofile-dev
+A dále na:
+calendar-backend,
+libatk1.0-0 (>= 1.24.0),
+libc6 (>= 2.5.0-1),
+libcairo2,
+libdbus-1-3 (>= 1.1.4),
+libdbus-glib-1-2 (>= 0.76),
+libfontconfig1 (>= 2.6.0),
+libfreetype6 (>= 2.3.9),
+libgcc1 (>= 1:4.2.1),
+libgconf2-6 (>= 2.13.5),
+libglib2.0-0 (>= 2.20.0),
+libgtk2.0-0 (>= 2:2.12.9-0osso1),
+libnotify1,
+libpango1.0-0,
+libprofile0,
+libqt4-maemo5-core (>= 4.6.2~git20100212),
+libqt4-maemo5-dbus (>= 4.6.2~git20100212),
+libqt4-maemo5-gui (>= 4.6.2~git20100212),
+libqt4-maemo5-maemo5 (>= 4.6.2~git20100212),
+libqt4-maemo5-network (>= 4.6.2~git20100212),
+libqt4-maemo5-xml (>= 4.6.2~git20100212),
+libqt4-maemo5-xmlpatterns (>= 4.6.2~git20100212),
+libstdc++6 (>= 4.2.1)
+
+Většina z těchto knihoven je již obsažena v systému.
+
+-------------------------------------------------------------------
+
+4::) Aplikace
+Aplikace jsi při prvním spuštění vytvoří v HOME složku NProfile a vní soubor profiles.xml
+pro ukládání profilů a načte dva profily z mobilu. Také vytvoří soubor cellidwifinum.xml
+pro pravidla.
--- /dev/null
+#include "calendar.h"
+#include <QtCore/QDateTime>
+#include <QtCore/QVector>
+#include <QtCore/QDebug> //Debug pro informace
+#include "event.h"
+/**
+ */
+Calendar::Calendar(QObject *parent) :
+ QObject(parent)
+{
+}
+
+/** AddEvent
+ Add event into calendar
+ \param id of event
+ \param des desctription
+ \param sum summary
+ \param SDate start date
+ \param EDate end date
+ */
+void Calendar::AddEvent(QString id, QString des ,QString sum, QDateTime SDate, QDateTime EDate)
+{
+ Event *event_new;
+ if((event_new = findEvent(id)) == NULL){
+ event_new = new Event(this);
+ vector_calendars_events.append(event_new);
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Create new event ";
+ connect(event_new,SIGNAL(s_event_change(Event*)),this,SLOT(EventChanged(Event*)));
+ event_new->SetTime(id, des, sum, SDate, EDate);
+ }
+}
+/** Delete event
+ delete event
+ \param id of event
+ */
+void Calendar::DeleteEvent(QString id)
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Delete event " << id;
+ for(int i = 0; i < vector_calendars_events.size();++i)
+ {
+ if(vector_calendars_events.at(i)->GetId() == id){
+ delete vector_calendars_events.at(i);
+ vector_calendars_events.remove(i);
+ return;
+ }
+ }
+}
+/** Delete all old events
+ */
+void Calendar::DeleteOldEvents()
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "delete all old events ";
+ QMutableVectorIterator<Event *> i(vector_calendars_events);
+ while (i.hasNext()) {
+ Event *val = i.next();
+ if (val->isOld() == true) {
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Event is old delete ";
+ delete val;
+ i.remove();
+ }
+ }
+}
+
+/** Change in event
+ Slot for change in event
+ \param ev event
+ */
+void Calendar::EventChanged(Event * ev)
+{
+ if(ev->isNow()) {
+ emit s_eventStart(ev);
+ } else {
+ emit s_eventStop(ev);
+ }
+}
+/** FindEventsNow
+ find all event for now
+ \returns vector of events
+ */
+QVector<Event *> Calendar::FindEventsNow()
+{
+ QVector<Event *> vector;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Search for now events ";
+ foreach(Event *evt, vector_calendars_events )
+ {
+ if(evt->isNow()){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Select event";
+ vector.append(evt);
+ }
+ }
+ return vector;
+}
+/** findevent
+ find event
+ \param i of event
+ */
+Event * Calendar::findEvent(QString i)
+{
+ foreach(Event * evt, vector_calendars_events)
+ {
+ if(evt->GetId() == i) return evt;
+ }
+ return NULL;
+}
+/** Setname
+ set name of calendar
+ \param n name of cal
+ */
+void Calendar::SetName(QString n)
+{
+ name_of_calendar = n;
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " jmeno kalendare je " << n;
+}
+/** SetIcon
+ set icon of calendar
+ \param ico icon of cal
+ */
+void Calendar::SetIcon(QIcon ico)
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Setting icon fo cal" ;
+ icon = ico;
+}
+/** SetId
+ set id of calendar
+ \param i id of cal
+ */
+void Calendar::SetId(int i)
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Id_cal:" << Id_cal;
+ Id_cal = i;
+}
+/** GetId
+ get id of calendar
+ */
+int Calendar::GetId()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Id_cal:" << Id_cal;
+ return Id_cal;
+}
+/** GetIcon
+ set icon of calendar
+ */
+QIcon Calendar::GetIcon()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "return icon";
+ return icon;
+}
+/** GetName
+get name of calendar
+ */
+QString Calendar::GetName()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Get name:" << name_of_calendar;
+ return name_of_calendar;
+}
--- /dev/null
+/** \file calendar.h
+ \brief contain class for saving calendar data
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#ifndef CALENDAR_H
+#define CALENDAR_H
+#include <QtCore/QVector>
+#include <QObject>
+#include <QtGui/QIcon>
+class Event;
+class QDateTime;
+
+/** \class Calendar
+ \brief class for saving calendar data
+ class store calendar data and events in calendar
+ */
+class Calendar : public QObject
+{
+Q_OBJECT
+public:
+ explicit Calendar(QObject *parent = 0);
+ void AddEvent(QString id, QString des ,QString sum, QDateTime SDate, QDateTime EDate);
+ void SetName(QString n);
+ void SetId(int i);
+ int GetId();
+ QString GetName();
+ Event * findEvent(QString i);
+ void SetIcon(QIcon ico);
+ QIcon GetIcon();
+ QVector<Event *> FindEventsNow();
+ void DeleteOldEvents();
+ void DeleteEvent(QString id);
+signals:
+ void s_eventStart(Event *);
+ void s_eventStop(Event *);
+
+private slots:
+ void EventChanged(Event * ev);
+
+private:
+ int Id_cal;
+ QString name_of_calendar;
+ QVector<Event *> vector_calendars_events;
+ QIcon icon;
+
+};
+
+#endif // CALENDAR_H
--- /dev/null
+#include "calendarprofilesdialog.h"
+#include "ui_calendarprofilesdialog.h"
+#include <QtGui/QStandardItemModel>
+#include <QtGui/QItemSelectionModel>
+#include <QtCore/QModelIndex>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include "calendarsetprofiledialog.h"
+/** Constructor.
+Setup ui and set window title
+*/
+CalendarProfilesDialog::CalendarProfilesDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::CalendarProfilesDialog)
+{
+ ui->setupUi(this);
+ setWindowTitle(tr("Edit profiles and calendars"));
+}
+
+/** SetViews.
+Set view models, behavior, mode and triggerrs
+\param model_of_profiles model of profiles
+\param selModel_profiles selection model for profiles
+\param model_of_calendars model of calendars
+\param selModel_calendars selection model for calendars
+*/
+void CalendarProfilesDialog::SetViews(QStandardItemModel *model_of_profiles ,
+ QItemSelectionModel *selModel_profiles,
+ QStandardItemModel *model_of_calendars ,
+ QItemSelectionModel *selModel_calendars)
+{
+ ui->Profile_tableView->setModel(model_of_profiles);
+ ui->Profile_tableView->setSelectionModel(selModel_profiles);
+ ui->Profile_tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui->Profile_tableView->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->Profile_tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ //ui->tableView_2->resizeColumnsToContents();
+ ui->Profile_tableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+
+ ui->CalendartableView->setModel(model_of_calendars);
+ ui->CalendartableView->setSelectionModel(selModel_calendars);
+ ui->CalendartableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+ ui->CalendartableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui->CalendartableView->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->CalendartableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+}
+
+/** SetSettings.
+Set settings pointer
+\param sett pointer to settings class
+*/
+void CalendarProfilesDialog::SetSettings(QSettings *sett)
+{
+ settings = sett;
+}
+
+/** Destructor.
+Destructor delete ui
+*/
+CalendarProfilesDialog::~CalendarProfilesDialog()
+{
+ delete ui;
+}
+
+/** changeEvent.
+changeEvent
+\param e event
+*/
+void CalendarProfilesDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/** on_CalendartableView_clicked.
+Slot for click on CalendartableView
+\param index index not used
+*/
+void CalendarProfilesDialog::on_CalendartableView_clicked(QModelIndex index)
+{
+ Q_UNUSED(index)
+
+ QItemSelectionModel *selModel_calendars = ui->CalendartableView->selectionModel();
+ if(!selModel_calendars->hasSelection()) return; // nothing selected return
+ QModelIndexList list_of_calendar = selModel_calendars->selectedIndexes();
+ //qDebug() << "size of list" << list_of_calendar.count();
+ int i = 0;
+ if(list_of_calendar.at(0).data(Qt::CheckStateRole).toInt() == 2){
+ i = 2;
+ }
+ //qDebug() << " print i " << i;
+ //qDebug() << " =========================================================================== ";
+ settings->beginGroup("CalendarProfileClassCalendars");
+ settings->setValue(list_of_calendar.at(0).data().toString(), QVariant(i) );
+ settings->endGroup();
+ //qDebug() << "emit změny";
+ emit s_change_calendars();
+ selModel_calendars->clearSelection();
+}
+
+/** on_Profile_tableView_clicked.
+Slot for click on Profile_tableView
+\param index index not used
+*/
+void CalendarProfilesDialog::on_Profile_tableView_clicked(QModelIndex index)
+{
+ Q_UNUSED(index)
+
+ QItemSelectionModel *selModel_profiles = ui->Profile_tableView->selectionModel();
+ if(!selModel_profiles->hasSelection()) return;
+ QModelIndexList list_of_profil = selModel_profiles->selectedIndexes();
+ QStandardItemModel *model_of_profiles = (QStandardItemModel *) ui->Profile_tableView->model();
+ CalendarSetProfileDialog dialog(this);
+ dialog.SetDialog(list_of_profil.at(0).data().toString(),list_of_profil.at(1).data().toString(),list_of_profil.at(2).data().toInt());
+ int result = dialog.exec();
+ if(result)
+ {
+ settings->beginGroup("CalendarProfileClass");
+ settings->setValue(QString("%1%2").arg(list_of_profil.at(0).data().toString(),"words"), QVariant(dialog.GetText()));
+ settings->setValue(QString("%1%2").arg(list_of_profil.at(0).data().toString(),"priority"), QVariant(dialog.GetPriority()));
+ settings->endGroup();
+
+ model_of_profiles->setData(list_of_profil.at(1),QVariant(dialog.GetText()),Qt::DisplayRole);
+ model_of_profiles->setData(list_of_profil.at(2),QVariant(dialog.GetPriority()),Qt::DisplayRole);
+ emit s_change_calendars();
+ }
+ selModel_profiles->clearSelection();
+}
--- /dev/null
+/** \file calendarprofilesdialog.h
+ \brief contain class for show dialog
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#ifndef CALENDARPROFILESDIALOG_H
+#define CALENDARPROFILESDIALOG_H
+
+#include <QDialog>
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QSettings;
+namespace Ui {
+ class CalendarProfilesDialog;
+}
+
+/** \class CalendarProfilesDialog
+ \brief class for calendar dialog
+ class show dialog for calendar rules
+ */
+class CalendarProfilesDialog : public QDialog {
+ Q_OBJECT
+public:
+ CalendarProfilesDialog(QWidget *parent = 0);
+ ~CalendarProfilesDialog();
+
+ void SetSettings(QSettings *sett);
+ void SetViews(QStandardItemModel *model_of_profiles ,
+ QItemSelectionModel *selModel_profiles,
+ QStandardItemModel *model_of_calendars ,
+ QItemSelectionModel *selModel_calendars);
+
+signals:
+ void s_change_calendars();
+ void s_change_profiles();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::CalendarProfilesDialog *ui;
+ QSettings *settings;
+
+private slots:
+ void on_Profile_tableView_clicked(QModelIndex index);
+ void on_CalendartableView_clicked(QModelIndex index);
+};
+
+#endif // CALENDARPROFILESDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CalendarProfilesDialog</class>
+ <widget class="QDialog" name="CalendarProfilesDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Calendar and rules</string>
+ </property>
+ <widget class="QLabel" name="Calendarlabel">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>90</y>
+ <width>181</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Allow calendars</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>280</y>
+ <width>201</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Set profiles rules</string>
+ </property>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>0</y>
+ <width>571</width>
+ <height>361</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTableView" name="CalendartableView"/>
+ </item>
+ <item>
+ <widget class="QTableView" name="Profile_tableView"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "calendarsetprofiledialog.h"
+#include "ui_calendarsetprofiledialog.h"
+#include <QtGui/QStandardItemModel>
+#include <QtGui/QItemSelectionModel>
+#include <QtCore/QModelIndex>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+/** Constructor.
+Setup ui
+*/
+CalendarSetProfileDialog::CalendarSetProfileDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::CalendarSetProfileDialog)
+{
+ ui->setupUi(this);
+}
+
+/** SetDialog.
+Init dialog
+\param profil name of profile
+\param text words in profile
+\param priority priority for profile
+*/
+void CalendarSetProfileDialog::SetDialog(QString profil, QString text, int priority)
+{
+ ui->lineEdit->setText(text);
+ ui->label->setText(profil);
+ ui->PriorityspinBox->setValue(priority);
+ setWindowTitle(profil);
+}
+
+/** SetSettings.
+Set settings pointer
+\param sett pointer to settings class
+*/
+void CalendarSetProfileDialog::SetSettings(QSettings *sett)
+{
+ settings = sett;
+}
+
+/** Destructor.
+Destructor delete ui
+*/
+CalendarSetProfileDialog::~CalendarSetProfileDialog()
+{
+ delete ui;
+}
+
+/** accept
+Slot for accept
+*/
+void CalendarSetProfileDialog::accept()
+{
+ done(QDialog::Accepted);
+}
+
+/** GetText
+Return text
+\returns text for profile
+*/
+QString CalendarSetProfileDialog::GetText()
+{
+ return ui->lineEdit->text();
+}
+
+/** GetPriority
+Return priority
+\returns priority for profile
+*/
+int CalendarSetProfileDialog::GetPriority()
+{
+ return ui->PriorityspinBox->value();
+}
+
+/** changeEvent.
+changeEvent
+\param e event
+*/
+void CalendarSetProfileDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
--- /dev/null
+/** \file calendarsetprofiledialog.h
+ \brief contain class for show dialog
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#ifndef CALENDARSETPROFILEDIALOG_H
+#define CALENDARSETPROFILEDIALOG_H
+
+#include <QDialog>
+class QSettings;
+namespace Ui {
+ class CalendarSetProfileDialog;
+}
+
+
+/** \class CalendarSetProfileDialog
+ \brief class for calendar rule
+ class show dialog for modifi calendar rule
+ */
+class CalendarSetProfileDialog : public QDialog {
+ Q_OBJECT
+public:
+ CalendarSetProfileDialog(QWidget *parent = 0);
+ void SetDialog(QString profil, QString text, int priority);
+ void SetSettings(QSettings *sett);
+ int GetPriority();
+ QString GetText();
+ ~CalendarSetProfileDialog();
+
+protected:
+ void changeEvent(QEvent *e);
+ void accept();
+
+private:
+ Ui::CalendarSetProfileDialog *ui;
+ QSettings *settings;
+};
+
+#endif // CALENDARSETPROFILEDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CalendarSetProfileDialog</class>
+ <widget class="QDialog" name="CalendarSetProfileDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>250</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Edit profile rulez</string>
+ </property>
+ <widget class="QPushButton" name="saveButton">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>130</y>
+ <width>201</width>
+ <height>71</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" name="PriorityspinBox">
+ <property name="geometry">
+ <rect>
+ <x>200</x>
+ <y>120</y>
+ <width>401</width>
+ <height>91</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>22</pointsize>
+ </font>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="lineEdit">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>10</y>
+ <width>791</width>
+ <height>101</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>22</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>610</x>
+ <y>140</y>
+ <width>191</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>22</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>saveButton</sender>
+ <signal>clicked()</signal>
+ <receiver>CalendarSetProfileDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>71</x>
+ <y>151</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>333</x>
+ <y>120</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+#include "calendatprofile.h"
+#include <QStringList>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QStandardItemModel>
+#include <QtCore/QVector>
+#include <QtCore/QVariant>
+#include <QtGui/QPixmap>
+#include <QtGui/QItemSelectionModel>
+#include <QtCore/QDateTime>
+#include <QtCore/QTimer>
+#include <QtCore/QTime>
+#include <QtDBus/QDBusConnection>
+#include "event.h"
+#include "calendar.h"
+#include "calendarprofilesdialog.h"
+
+static const char* CALENDAR_DBUS_LISTENER_SERVICE = "com.nokia.calendar";
+static const char* CALENDAR_DBUS_OBJECT_PATH = "/com/nokia/calendar";
+static const char* CALENDAR_DBUS_LISTENER_SIGNAL = "dbChange";
+
+/** Constructor.
+Setup ui, create multiCalendar, set QSettings pointer, create timer and model
+*/
+CalendarProfile::CalendarProfile(QWidget *parent, QSettings *sett) :
+ QWidget(parent)
+{
+ multiCalendar = CMulticalendar::MCInstance();
+ settings = sett;
+ timer = new QTimer(this);
+ timer->setSingleShot(true);//A single-shot timer fires only once
+ connect(timer,SIGNAL(timeout()),this,SLOT(TimerTimeout()));
+ QDBusConnection::sessionBus().connect( "", CALENDAR_DBUS_OBJECT_PATH, CALENDAR_DBUS_LISTENER_SERVICE,CALENDAR_DBUS_LISTENER_SIGNAL,this,SLOT(calendarTrack(QString)));
+ createModels();//
+}
+
+/** calendarTrack
+Slot for signal when db for calendar change
+*/
+void CalendarProfile::calendarTrack(QString str)
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << str ;
+ qDeleteAll(vector_of_calendars);
+ vector_of_calendars.clear();
+ profile_Currently = QString("");
+ eventCurrently = QString("");
+ emit s_calendar_profile(profile_Currently);
+ loadCalendarsAndEvents();
+}
+
+/**
+ V dbusus je funkce
+dbus_message_new_signal ( const char * path,
+ const char * interface,
+ const char * name
+ )
+
+Parameters:
+ path the path to the object emitting the signal
+ interface the interface the signal is emitted from
+ name name of the signal
+
+v DB na calendar je
+static const char* CALENDAR_DBUS_LISTENER_SERVICE = "com.nokia.calendar";
+static const char* CALENDAR_DBUS_OBJECT_PATH = "/com/nokia/calendar";
+static const char* CALENDAR_DBUS_LISTENER_SIGNAL = "dbChange";
+
+ dbusMessage = dbus_message_new_signal(CALENDAR_DBUS_OBJECT_PATH,
+ CALENDAR_DBUS_LISTENER_SERVICE,
+ CALENDAR_DBUS_LISTENER_SIGNAL);
+
+ v QT4
+ bool QDBusConnection::connect ( const QString & service, const QString & path, const QString & interface,
+ const QString & name, QObject * receiver, const char * slot )
+ */
+
+
+
+/** Destructor.
+Destructor delete ui
+*/
+CalendarProfile::~CalendarProfile()
+{
+ delete multiCalendar;
+}
+
+/** TimerTimeout
+slot for timer timeout
+*/
+void CalendarProfile::TimerTimeout()
+{
+ loadCalendarsAndEvents();
+}
+
+/** createModels
+create models
+*/
+void CalendarProfile::createModels()
+{
+ model_of_profiles = new QStandardItemModel(this);
+ selModel_profiles = new QItemSelectionModel(model_of_profiles);
+ model_of_calendars = new QStandardItemModel(this);
+ selModel_calendars = new QItemSelectionModel(model_of_calendars);
+}
+
+/** Init
+Init start calendar profile class
+This will download first data from calendar
+*/
+void CalendarProfile::Init()
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
+ // setProfiles(list_of_profiles_n); //profile model
+ loadCalendarsAndEvents();
+}
+
+/** loadCalendarsAndEvents
+Load calendar data
+This will download data from calendar
+*/
+void CalendarProfile::loadCalendarsAndEvents()
+{
+ int errorCode = 0;
+
+ QDateTime startofday = QDateTime::currentDateTime();
+ startofday.setTime(QTime(0,0)); // time to 0,0
+ startofday = startofday.addDays(-1);
+ QDateTime endofday = QDateTime::currentDateTime();
+ endofday= endofday.addDays(1);
+ endofday.setTime(QTime(23,59)); // time to 23,59
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "zacatek" << startofday << "konec" << endofday;
+ vector< CComponent * > components;
+ QVector<CComponent *> vector_of_events;
+ vector < CCalendar * > vector_of_cal_std = multiCalendar->getListCalFromMc();
+
+ QVector<CCalendar *> qvector_of_cal = QVector< CCalendar *>::fromStdVector(vector_of_cal_std); //
+ Calendar *cal;
+ if(!qvector_of_cal.empty())
+ {
+ foreach(CCalendar * ccal, qvector_of_cal ){
+ //if calendar exist return pointer else create new
+ if(( cal = findCalendar(ccal->getCalendarId())) == NULL)
+ {
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "judela se novy cal ";
+ cal = new Calendar(this);
+ cal->SetName(QString::fromStdString(ccal->getCalendarName()));
+ vector_of_calendars.append(cal);
+ connect(cal,SIGNAL(s_eventStart(Event*)),this,SLOT(event_start(Event*)));
+ connect(cal,SIGNAL(s_eventStop(Event*)),this,SLOT(event_stop(Event*)));
+ cal->SetIcon(createIcon(ccal->getCalendarColor()));
+ }
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "ziskaj se eventy kalendar" << QString::fromStdString(ccal->getCalendarName());
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "id cal " << ccal->getCalendarId();
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "start datum " << startofday;
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "end datum " << endofday;
+ components = multiCalendar->getComponents(ccal->getCalendarId(),
+ 1, startofday.toTime_t(),
+ endofday.toTime_t(), errorCode);
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "err code " << errorCode;
+ vector_of_events = QVector<CComponent *>::fromStdVector(components);
+ if(!vector_of_events.empty()){
+ foreach(CComponent *ccompo, vector_of_events){
+ cal->AddEvent(QString::fromStdString(ccompo->getId()),QString::fromStdString(ccompo->getDescription()),QString::fromStdString(ccompo->getSummary()), QDateTime::fromTime_t(ccompo->getDateStart()),QDateTime::fromTime_t(ccompo->getDateEnd()));
+ qDebug()<< "getId" << QString::fromStdString(ccompo->getId());
+ qDebug()<< " get summary " << QString::fromStdString(ccompo->getSummary());
+ qDebug()<< "getDescription" << QString::fromStdString(ccompo->getDescription());
+ }
+ cal->DeleteOldEvents();//delete old events
+ } else {
+ qDebug()<< "Vektor s udalostma je prazdnej ?" ;
+ }
+ qDeleteAll( components);
+ components.clear();
+ }
+ }
+ multiCalendar->releaseListCalendars(vector_of_cal_std);
+ setCalendarModel();
+ timer->start(QDateTime::currentDateTime().secsTo(startofday.addDays(2)) * 1000 + 1000);//timer set for next day + 1 sec
+}
+
+enum CalendarColour;
+/** createIcon
+Create icon fro calendar
+\param col color from maemo
+\returns QIcon for calendar
+*/
+QIcon CalendarProfile::createIcon(CalendarColour col)
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
+ QPixmap pix_map = QPixmap(40,40);
+ if(col == COLOUR_DARKBLUE)
+ {
+ pix_map.fill(QColor("darkblue"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_DARKGREEN){
+ pix_map.fill(QColor("darkseagreen"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_DARKRED){
+ pix_map.fill(QColor("darkred"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_ORANGE){
+ pix_map.fill(QColor("orange"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_VIOLET){
+ pix_map.fill(QColor("violet"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_YELLOW){
+ pix_map.fill(QColor("yellow"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_WHITE){
+ pix_map.fill(QColor("white"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_BLUE){
+ pix_map.fill(QColor("blue"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_RED){
+ pix_map.fill(QColor("red"));
+ return QIcon(pix_map);
+ }else if( col == COLOUR_GREEN){
+ pix_map.fill(QColor("green"));
+ return QIcon(pix_map);
+ }
+ pix_map.fill(QColor("white"));
+ return QIcon(pix_map);
+}
+
+/** setCalendarModel
+Sets calendar model
+*/
+void CalendarProfile::setCalendarModel()
+{
+ model_of_calendars->clear();
+ QStringList labels;
+ labels << tr("Name od calendars") ;
+ model_of_calendars->setHorizontalHeaderLabels(labels);
+ QList<QStandardItem *> items;
+ QStandardItem *item;
+
+ foreach(Calendar *cal, vector_of_calendars){
+ item = new QStandardItem(cal->GetIcon(),cal->GetName());
+ item->setCheckable(true);
+
+ settings->beginGroup("CalendarProfileClassCalendars");
+ if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
+
+ item->setCheckState(Qt::Checked);
+ }
+ settings->endGroup();
+ items.append(item);
+ model_of_calendars->appendRow(items);
+ items.clear();
+ }
+}
+
+/** findCalendar
+Find calendar
+\param Id Id of calendar
+\returns poiter to calendar
+*/
+Calendar * CalendarProfile::findCalendar(int Id)
+{
+ qDebug()<< "search for calendar";
+ foreach(Calendar *cal, vector_of_calendars){
+ if(cal->GetId() == Id)
+ return cal;
+ }
+ return NULL;
+}
+
+//===========================================================================================
+/** setProfiles
+Set model for profiles
+\param list_of_profiles_n list of profiles
+*/
+void CalendarProfile::setProfiles(QStringList list_of_profiles_n)
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "zavolat se a bude se nastavovat))))))))))))))))))))))))))))))))))))))))))))))))))))))" ;
+ model_of_profiles->clear();//smazu ho
+ QList<QStandardItem *> items;
+ QStandardItem *item;
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
+ settings->beginGroup("CalendarProfileClass");
+ foreach(QString profile, list_of_profiles_n)
+ {
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "set profile" << profile ;
+ item = new QStandardItem(profile);
+ items.append(item);
+ item = new QStandardItem(settings->value(QString("%1%2").arg(profile,"words"), QVariant("")).toString());
+ items.append(item);
+ item = new QStandardItem(settings->value(QString("%1%2").arg(profile,"priority"), QVariant("0")).toString());
+ qDebug() << "novej model priorita" << settings->value(QString("%1%2").arg(profile,"priority"), QVariant("0"));
+ items.append(item);
+ model_of_profiles->appendRow(items);
+ items.clear();
+ }
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << settings->value("Novy2priority", 0); ;
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << settings->value("Novy2words", "nic") ;
+ settings->endGroup();
+
+ QStringList labels;
+ labels << tr("Name of profile") << tr("Words") << tr("Priority");
+ model_of_profiles->setHorizontalHeaderLabels(labels);
+
+ profile_Currently = QString("");
+ eventCurrently = QString("");
+ SetProfile();
+}
+
+/** event_start
+Slot for events start
+\param ev event
+*/
+void CalendarProfile::event_start(Event * ev)
+{
+ // int i = 0;
+ // i = getProfilePriority(evaluateEvent(ev)); //ziskam prioritu
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil co zacal je spocitana priorita";
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil cp ted je " << profile_Currently;
+ // if(i > getProfilePriority(profile_Currently)){
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "start event with bigger priority";
+ SetProfile();
+ // }
+}
+
+/** event_stop
+Slot for events stop
+\param ev event
+*/
+void CalendarProfile::event_stop(Event* ev)
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "event_stop";
+ if(eventCurrently == ev->GetId())
+ {
+ profile_Currently = QString("");
+ eventCurrently = QString("");
+ SetProfile();
+ }
+}
+
+/** SetProfile
+Set profile based on caledars, events and profiles words
+*/
+void CalendarProfile::SetProfile()
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "SetProfile";
+ QVector<Event *> vector_ev;
+ QString prof = QString("");
+
+ settings->beginGroup("CalendarProfileClassCalendars");
+ foreach(Calendar* cal, vector_of_calendars)
+ {
+ if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Pro kalendar" << cal->GetName() << "Search for profiles";
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Tak co tam ted je" << settings->value(QString("%1").arg(cal->GetId()), QVariant("0")).toString();
+
+ vector_ev += cal->FindEventsNow();
+ }
+ }
+ settings->endGroup();
+ profile_Currently = QString("");
+ eventCurrently = QString("");
+ if(vector_ev.empty()){
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Found nothing";
+
+ emit s_calendar_profile(profile_Currently);
+ return;
+
+ }
+
+ QString str = evaluateEvent(vector_ev);
+
+ //
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profole for now" << profile_Currently;
+ emit s_calendar_profile(profile_Currently);
+}
+
+/** evaluateEvent
+Method for finding profile for event
+\param ev event
+*/
+QString CalendarProfile::evaluateEvent( QVector<Event *> vector_ev)
+{
+ QString profile = QString("");
+ QStringList list_names;
+ int wordscount_old = 0;
+ int wordscount_new = 0;
+ int priority_old = 0;
+ int priority_new = 0;
+
+ foreach(Event * ev, vector_ev)//forech event
+ {
+ for(int i = 0; i < model_of_profiles->rowCount(); i++) //fing best profiel
+ {
+ list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
+ qDebug() << "pro profil " << model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString() << "jsem našel počet stjeenjch " << wordsCount(list_names,ev->GetSummary()) << "a ma proioritu " << model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
+
+ wordscount_new = wordsCount(list_names,ev->GetSummary());
+ if(wordscount_new == 0) continue;//pokud nenasel zadan slova pokracuje
+ priority_new = model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
+
+ if(priority_new > priority_old)
+ {
+ qDebug() << "priorita je větsi nez tam byl ";
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
+ wordscount_old = wordscount_new;
+ wordscount_new = 0;
+ profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
+ profile_Currently = profile;
+
+ eventCurrently = ev->GetId();
+
+ priority_old = priority_new;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
+ } else if((priority_new == priority_old) && (wordscount_new > wordscount_old))
+ {
+ qDebug() << "stejna prio ale vetsi pocet slov";
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
+ wordscount_old = wordscount_new;
+ wordscount_new = 0;
+ profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
+ priority_old = priority_new;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
+ profile_Currently = profile;
+ eventCurrently = ev->GetId();
+ }
+ }
+ }
+ qDebug() << "budu vracet profil co se na to hodi:" << profile;
+ return profile;
+}
+
+/**
+
+void CalendarProfile::SetProfile()
+{
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "SetProfile";
+ QVector<Event *> vector_ev;
+ QString prof = QString("");
+
+ settings->beginGroup("CalendarProfileClassCalendars");
+ foreach(Calendar* cal, vector_of_calendars)
+ {
+ if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Pro kalendar" << cal->GetName() << "Search for profiles";
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Tak co tam ted je" << settings->value(QString("%1").arg(cal->GetId()), QVariant("0")).toString();
+
+ vector_ev += cal->FindEventsNow();
+ }
+ }
+ settings->endGroup();
+
+ if(vector_ev.empty()){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Found nothing";
+ profile_Currently = QString("");
+ eventCurrently = QString("");
+ }
+
+ foreach(Event * ev, vector_ev)
+ {
+ qDebug() << "pro nejakej event evaluate";
+ prof = evaluateEvent(ev);
+ qDebug() << "konec evaluate";
+ if(!profile_Currently.isEmpty())
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profil uz tam ted nastavenej je a to" << profile_Currently;
+ if(getProfilePriority(profile_Currently) < getProfilePriority(prof))
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "prof je ted" << prof;
+ profile_Currently = prof;
+
+ eventCurrently = ev->GetId();
+ }
+ } else {
+ profile_Currently = prof;
+ eventCurrently = ev->GetId();
+ }
+
+ }
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profole for now" << profile_Currently;
+ emit s_calendar_profile(profile_Currently);
+}
+
+
+QString CalendarProfile::evaluateEvent(Event * ev)
+{
+ QString profile = QString("");
+ QStringList list_names;
+ int wordscount_old = 0;
+ int wordscount_new = 0;
+ int priority_old = 0;
+ int priority_new = 0;
+
+ for(int i = 0; i < model_of_profiles->rowCount(); i++)
+ {
+
+ list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
+ qDebug() << "pro profil " << model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString() << "jsem našel počet stjeenjch " << wordsCount(list_names,ev->GetSummary()) << "a ma proioritu " << model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
+
+ wordscount_new = wordsCount(list_names,ev->GetSummary());
+ priority_new = model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
+
+ if(priority_new > priority_old)
+ {
+ qDebug() << "priorita je větsi nez tam byl ";
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
+ wordscount_old = wordscount_new;
+ wordscount_new = 0;
+ profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
+ priority_old = priority_new;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
+ } else if((priority_new == priority_old) && (wordscount_new > wordscount_old))
+ {
+ qDebug() << "stejna prio ale vetsi pocet slov";
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
+ wordscount_old = wordscount_new;
+ wordscount_new = 0;
+ profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
+ priority_old = priority_new;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
+ }
+ }
+ qDebug() << "budu vracet profil co se na to hodi:" << profile;
+ return profile;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+QString CalendarProfile::evaluateEvent(Event * ev)
+{
+ QString profile = QString("");
+ QStringList list_names;
+ int ccount = 0;
+ int x = 0;
+ int prio = 0;
+ for(int i = 0; i < model_of_profiles->rowCount(); i++)
+ {
+
+ list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
+
+
+
+ if(((x = wordsCount(list_names,ev->GetSummary())) > ccount) && (model_of_profiles->item(i,2)->data().toInt() >= prio)){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << x;
+ ccount = x;
+ x = 0;
+ profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
+ prio = getProfilePriority(profile);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
+ }
+ }
+ return profile;
+}
+ */
+
+
+/** getProfilePriority
+Priority for profile
+\param name_of_profile name of event
+*/
+int CalendarProfile::getProfilePriority(QString name_of_profile)
+{
+ if(name_of_profile.isEmpty()) return 0;
+ int ro = 0;
+ ro = model_of_profiles->findItems(name_of_profile).at(0)->row(); // najdu na kterým je to řádku
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << " profil " << name_of_profile << "je na řádku" << ro;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << " profil " << name_of_profile << " jeho prio je " << model_of_profiles->item(ro,2)->data(Qt::DisplayRole).toInt();
+ return model_of_profiles->item(ro,2)->data(Qt::DisplayRole).toInt(); // vratim
+}
+
+/** wordsCount
+Return number of words in event summary
+\param words list of words in profile
+\param text text in event
+*/
+int CalendarProfile::wordsCount(QStringList words, QString text)
+{
+ int count = 0;
+ foreach(QString word, words)
+ {
+ if(text.contains(word,Qt::CaseInsensitive)) ++count;
+ }
+ qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Pocet slov:" << count << "v textu" << text << "slova co se maj najit" << words;
+ return count;
+}
+
+//===========================================================================
+/** ShowDialog
+For dialog for modifi calendars and profiles
+*/
+void CalendarProfile::ShowDialog()
+{
+ CalendarProfilesDialog dialog(this);
+ dialog.SetViews(model_of_profiles,selModel_profiles,model_of_calendars,selModel_calendars);
+ dialog.SetSettings(settings);
+ connect(&dialog,SIGNAL(s_change_calendars()),this,SLOT(ChangeInCalendarsCheck()));
+ dialog.exec();
+ disconnect(&dialog,SIGNAL(s_change_calendars()),this,SLOT(ChangeInCalendarsCheck()));
+}
+
+/** ChangeInCalendarsCheck
+Slot for chnages in calendars check
+*/
+void CalendarProfile::ChangeInCalendarsCheck()
+{
+ SetProfile();
+}
--- /dev/null
+/** \file calendatprofile.h
+ \brief contain class setting profile based on calendar
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#ifndef CALENDATPROFILE_H
+#define CALENDATPROFILE_H
+
+#include <QWidget>
+#include <CCalendar.h>
+#include <CMulticalendar.h>
+#include <CTodo.h>
+#include <CBdayEvent.h>
+#include <CEvent.h>
+
+class CCalendar;
+class CComponent;
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QIcon;
+class Event;
+class Calendar;
+class CMulticalendar;
+class QStringList;
+class QSettings;
+class QTime;
+
+/** \class CalendarProfile
+ \brief class for setting calendar profile
+ class set profile based o rules
+ */
+class CalendarProfile : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit CalendarProfile(QWidget *parent = 0, QSettings *sett = 0);
+ ~CalendarProfile();
+ void Init();
+ void ShowDialog();
+
+signals:
+ void s_calendar_profile(QString profile);
+
+public slots:
+ void setProfiles(QStringList list_of_profiles_n);
+
+private:
+ QSettings * settings;
+ CMulticalendar* multiCalendar;
+ void loadCalendarsAndEvents();
+ QVector<Calendar *> vector_of_calendars;
+ QIcon createIcon(CalendarColour col);
+ Calendar * findCalendar(int Id);
+
+ int wordsCount(QStringList words, QString text);
+ QString evaluateEvent( QVector<Event *> vector_ev);
+ int getProfilePriority(QString name_of_profile);
+ void SetProfile();
+
+ QString eventCurrently;
+ QString profile_Currently;
+
+ void createModels();
+ void setCalendarModel();
+
+ QStandardItemModel *model_of_calendars;
+ QItemSelectionModel *selModel_calendars;
+ QStandardItemModel *model_of_profiles;
+ QItemSelectionModel* selModel_profiles;
+
+ QTimer *timer;
+
+private slots:
+ void event_start(Event * ev);
+ void event_stop(Event* ev);
+ void TimerTimeout();
+ void ChangeInCalendarsCheck();
+ void calendarTrack(QString);
+};
+
+#endif // CALENDATPROFILE_H
--- /dev/null
+
+#include <QtCore/QSettings>
+#include "controlclass.h"
+#include "profiledb.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include "timeprofile.h"
+#include "calendatprofile.h"
+#include "networkprofile.h"
+#include "telephonenumprofile.h"
+
+/** Constructor.
+ Set pointers to NULL and create new profile db
+*/
+ControlClass::ControlClass(QWidget *parent) :
+ QWidget(parent)
+{
+ settings = NULL;
+ p_profile_db = new ProfileDB(this); //create new db
+}
+
+/** Destructor.
+*/
+ControlClass::~ControlClass()
+{
+}
+
+/** Init.
+ Used to initialize and connect slot and signals
+ \param setting reference to the setting class
+*/
+void ControlClass::Init( QSettings *setting )
+{
+ settings = setting;
+
+ p_time_profile = new TimeProfile(this,setting); //create class for setting timed profile
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profiles_name_change(QStringList)),p_time_profile,SLOT(ChangeInProfles(QStringList)));
+ p_calendar_profile = new CalendarProfile(this, settings);
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profile_update(QString)),this,SLOT(ChangeInProfile(QString)));
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profiles_name_change(QStringList)),p_calendar_profile,SLOT(setProfiles(QStringList)));
+ connect(p_time_profile,SIGNAL(s_set_timed_profile(QString)),this,SLOT(ChangeTimedProfile(QString)));
+ connect(p_calendar_profile,SIGNAL(s_calendar_profile(QString)),this,SLOT(ChangeCalendarProfile(QString)));
+ p_network_profile = new NetWorkProfile(this,setting);
+ connect(p_network_profile,SIGNAL(s_network_profile(QString)),this,SLOT(ChangeNetworkProfile(QString)));
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profiles_name_change(QStringList)),p_network_profile,SLOT(SetProfilenames(QStringList)));
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profile_delete(QString)),p_network_profile,SLOT(DeletedProfile(QString)));
+ p_telenum_profil = new TelephoneNumProfile(this);
+ connect(p_profile_db->GetProfileManager(),SIGNAL(s_profiles_name_change(QStringList)),p_telenum_profil,SLOT(SetProfilenames(QStringList)));
+ connect(p_telenum_profil,SIGNAL(s_telnum_profile(QString)),this,SLOT(ChangeTelNumProfile(QString)));
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "create new db";
+ //set deafult profile
+ settings->beginGroup("ControlClass");
+ default_profile = settings->value("DefaultProfile", "general").toString(); //set default profile
+ settings->endGroup();
+
+ //for signal when profile is changed (update profile)
+
+ p_profile_db->Init();//init db
+
+ p_calendar_profile->Init();
+ p_network_profile->createModels(p_profile_db->GetRulesManager()->GetCellIDModel(),p_profile_db->GetRulesManager()->GetWiFiModel());
+ p_telenum_profil->createModels(p_profile_db->GetRulesManager()->GetTelNumModel());
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Deafult Profile: " << default_profile;
+}
+
+/** ChangeTeNulProfile
+Slot for signal from class for tel num profil to set
+\param profile_name name of profile
+*/
+void ControlClass::ChangeTelNumProfile(QString profile_name)
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Timer set";
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "name of timed profile:" << profile_name;
+ telnum_profile = profile_name;
+ //emit s_timed_profile_name(timer_profile); //signal for MainWindow
+ ChooseProfile();
+}
+
+
+/** ChangeTimedProfile
+Slot for signal from class for timed profil to set
+\param profile_name name of profile
+*/
+void ControlClass::ChangeTimedProfile(QString profile_name)
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Timer set";
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "name of timed profile:" << profile_name;
+ timer_profile = profile_name;
+ emit s_timed_profile_name(timer_profile); //signal for MainWindow
+ ChooseProfile();
+}
+
+/** ChangeNetworkProfile
+Slot for signal from class for network profil to set
+*/
+void ControlClass::ChangeNetworkProfile(QString profile_name)
+{
+ network_profile = profile_name;
+ emit s_network_profile_name(network_profile);
+ ChooseProfile();
+}
+
+/** ChangeCalendarProfile
+Slot for signal from class for caledar profil to set
+\param profile_name name of profile
+*/
+void ControlClass::ChangeCalendarProfile(QString profile_name)
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Calendar set";
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "name of calendar profile:" << profile_name;
+ calendar_profile = profile_name;
+ emit s_calendar_profile_name(calendar_profile);
+ ChooseProfile();
+}
+
+
+/** SetDefaultProfile(QString profile).
+Method for setting default profile
+\param profile name of profile
+*/
+void ControlClass::SetDefaultProfile(QString profile)
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "profil default: " << profile;
+ //not to set same profile
+ if(profile != default_profile){
+
+ settings->beginGroup("ControlClass");
+ settings->setValue("DefaultProfile", profile);
+ settings->endGroup();
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "default profile will be set: " << profile;
+ default_profile = profile;
+ ChooseProfile();
+ }
+}
+
+/** SetTelNum
+Show network dialog
+*/
+void ControlClass::SetTelNum()
+{
+ p_telenum_profil->ShowDialog();
+}
+
+
+/** SetNetwork
+Show network dialog
+*/
+void ControlClass::SetNetwork()
+{
+ p_network_profile->ShowDialog();
+}
+
+/** SetCalendar
+Show calendat dialog
+*/
+void ControlClass::SetCalendar()
+{
+ p_calendar_profile->ShowDialog();
+}
+
+/** SetTimeProfile
+Call time profile class to show dialog to set timed profile
+*/
+void ControlClass::SetTimeProfile()
+{
+ p_time_profile->SetTimer(p_profile_db->GetProfileManager()->GetProfilesNames());
+}
+
+
+/** ChooseProfile().
+This method will chosse profile from default_profile, timer_profile and calendar_profile
+based of priority
+*/
+void ControlClass::ChooseProfile()
+{
+ // QString textShow = tr("Current profile is: ");
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " timer profile empty " << timer_profile.isEmpty();
+ if(!telnum_profile.isEmpty()){
+ if(telnum_profile != actual_set_profile){
+ p_profile_db->GetProfileManager()->SetProfile(telnum_profile);
+ actual_set_profile = telnum_profile;
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "time profile waill be set now";
+ }
+ } else if(!timer_profile.isEmpty()){
+ if(timer_profile != actual_set_profile){
+ if(telnum_profile.isEmpty()){
+ emit s_profile_now(QObject::tr("Timer profile: ") + timer_profile);
+ }
+ p_profile_db->GetProfileManager()->SetProfile(timer_profile);
+ actual_set_profile = timer_profile;
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "time profile waill be set now";
+ }
+ }else if(!network_profile.isEmpty())
+ {
+ if(network_profile != actual_set_profile)
+ {
+ if(telnum_profile.isEmpty()){
+ emit s_profile_now(QObject::tr("Network profile: ") + network_profile);
+ }
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "network profile will be set";
+ p_profile_db->GetProfileManager()->SetProfile(network_profile);
+ actual_set_profile = network_profile;
+ }
+ }
+ else if(!calendar_profile.isEmpty())
+ {
+ if(calendar_profile != actual_set_profile) {
+ if(telnum_profile.isEmpty()){
+ emit s_profile_now(QObject::tr("Calendar profile: ") + calendar_profile);
+ }
+ p_profile_db->GetProfileManager()->SetProfile(calendar_profile);
+ actual_set_profile = calendar_profile;
+
+ }
+ } else {
+ if(default_profile != actual_set_profile) {
+ if(telnum_profile.isEmpty()){
+ emit s_profile_now(QObject::tr("Default profile: ") + default_profile);
+ }
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "deafult profile will be set";
+ p_profile_db->GetProfileManager()->SetProfile(default_profile);
+ actual_set_profile = default_profile;
+
+ }
+ }
+}
+//====================================================================
+
+/** ChangeInProfile
+Slot for change in profile
+\param profile name of profile
+*/
+void ControlClass::ChangeInProfile(QString profile)
+{
+ if(actual_set_profile == profile ) p_profile_db->GetProfileManager()->SetProfile(profile);
+}
+/** GetProfileDB()
+Returns the object reference for the database
+\returns pointer to ProfileDB
+*/
+ProfileDB * ControlClass::GetProfileDB()
+{
+ return p_profile_db;
+}
+
+/** GetDefaultProfile()
+Returns the name of default profile
+\returns name of default profile
+*/
+QString ControlClass::GetDefaultProfile()
+{
+ return default_profile;
+}
+
+/** GetTimedProfile()
+Returns the name of timed profile
+\returns name of timed profile
+*/
+QString ControlClass::GetTimedProfile()
+{
+ return timer_profile;
+}
+
+/** GetCalendarProfile()
+Returns the name of calendar profile
+\returns name of calendar profile
+*/
+QString ControlClass::GetCalendarProfile()
+{
+ return calendar_profile;
+}
--- /dev/null
+#ifndef CONTROLCLASS_H
+#define CONTROLCLASS_H
+
+/*! \file controlclass.h
+ \brief File .h for class ControlClass
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ Header file
+*/
+
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QWidget>
+class QSettings;
+class ProfileDB;
+class TimeProfile;
+class CalendarProfile;
+class NetWorkProfile;
+class TelephoneNumProfile;
+
+/*!
+ \class ControlClass
+ \brief The ControlClass for control and setting profiles
+*/
+class ControlClass : public QWidget{
+ Q_OBJECT
+public:
+ ControlClass(QWidget *parent = 0);
+ ~ControlClass();
+
+ void Init( QSettings * setting);
+ ProfileDB * GetProfileDB();
+ void SetTimeProfile();
+ void SetCalendar();
+ void SetNetwork();
+ void SetTelNum();
+
+ QString GetDefaultProfile();
+ QString GetTimedProfile();
+ QString GetCalendarProfile();
+
+ void SetDefaultProfile(QString profile);
+
+private:
+ QSettings * settings;
+ ProfileDB * p_profile_db;
+ TimeProfile * p_time_profile;
+ CalendarProfile * p_calendar_profile;
+ NetWorkProfile * p_network_profile;
+ TelephoneNumProfile * p_telenum_profil;
+
+ //names of profiles that are set
+ QString default_profile;
+ QString timer_profile;
+ QString calendar_profile;
+ QString network_profile;
+ QString telnum_profile;
+ QString actual_set_profile;
+
+ void ChooseProfile();
+
+public slots:
+ void ChangeInProfile(QString);
+
+
+
+
+public slots:
+ void ChangeTimedProfile(QString profile_name);
+ void ChangeCalendarProfile(QString profile_name);
+ void ChangeNetworkProfile(QString profile_name);
+ void ChangeTelNumProfile(QString profile_name);
+
+
+signals:
+ void s_timed_profile_name(QString);
+ void s_calendar_profile_name(QString);
+ void s_network_profile_name(QString);
+
+ void s_profile_now(QString);
+};
+
+#endif // CONTROLCLASS_H
--- /dev/null
+[Desktop Entry]
+Encoding=UTF-8
+Version=0.1
+Type=Application
+Name=N9Profil
+Exec=/usr/bin/N9Profil
+Icon=N9Profil
+X-Maemo-Category=Main
+X-Window-Icon=N9Profil
+X-Window-Icon-Dimmed=N9Profil
+X-Osso-Service=org.indt.N9Profil
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.47pre4 r22446"
+ version="1.0"
+ sodipodi:docname="N9Profil.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/scratchbox/users/tim/home/tim/projects/MaemoRate/data/icons/icon40x40.png"
+ inkscape:export-xdpi="75"
+ inkscape:export-ydpi="75">
+ <defs
+ id="defs4"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 24 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="48 : 24 : 1"
+ inkscape:persp3d-origin="24 : 16 : 1"
+ id="perspective13" />
+<linearGradient
+ id="linearGradient3142">
+ <stop
+ style="stop-color:#ed8300;stop-opacity:1;"
+ offset="0"
+ id="stop3144" />
+ <stop
+ style="stop-color:#edb400;stop-opacity:1;"
+ offset="1"
+ id="stop3146" />
+</linearGradient>
+
+ <style
+ id="style2930"
+ type="text/css">
+
+ .str0 {stroke:#1F1A17;stroke-width:0.0762}
+ .fil0 {fill:none}
+ .fil1 {fill:#1F1A17}
+ .fil4 {fill:#DA251D}
+ .fil3 {fill:white}
+ .fil2 {fill:#1F1A17;fill-rule:nonzero}
+
+ </style>
+
+ <inkscape:perspective
+ id="perspective2976"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="10.520833"
+ inkscape:cx="15.128814"
+ inkscape:cy="24"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ width="48px"
+ height="48px"
+ borderlayer="true"
+ showgrid="true"
+ inkscape:object-bbox="true"
+ inkscape:object-points="true"
+ inkscape:object-nodes="true"
+ objecttolerance="10000"
+ inkscape:grid-points="true"
+ gridtolerance="10000"
+ inkscape:guide-points="true"
+ guidetolerance="10000"
+ inkscape:window-width="1280"
+ inkscape:window-height="752"
+ inkscape:window-x="-4"
+ inkscape:window-y="-3"
+ inkscape:snap-page="true"
+ inkscape:snap-global="false"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ d="m 10.260078,27.421009 c 0,-0.75323 0.344033,-1.129786 1.036516,-1.129786 0.688068,0 1.031985,0.376556 1.031985,1.129786 1.790579,0.192766 3.166598,0.986392 4.123641,2.389736 0.379355,0.551486 0.705728,1.32267 0.979119,2.31355 0.277807,0.986392 0.414677,1.883133 0.414677,2.676641 l 0,0.945996 c 0,0.878788 0.149883,1.645483 0.44535,2.309062 0.299882,0.659091 0.908593,1.600599 1.830315,2.815664 l 0.489618,0.659091 c 0.396899,0.524556 0.595349,1.013205 0.595349,1.470552 0,1.076043 -0.930669,1.963807 -2.796189,2.658805 -1.865637,0.694999 -4.238319,1.044624 -7.113865,1.044624 -2.8887911,0 -5.2615898,-0.349625 -7.1228112,-1.044624 -1.8611051,-0.694998 -2.7916577,-1.582762 -2.7916577,-2.658805 0,-0.457347 0.1984497,-0.945996 0.5953492,-1.470552 l 0.4895015,-0.659091 c 0.9218385,-1.215065 1.5304331,-2.156573 1.8216011,-2.815664 0.295467,-0.663579 0.4409349,-1.430274 0.4409349,-2.309062 l 0,-0.945996 c 0,-0.793508 0.1411688,-1.690249 0.4190914,-2.676641 0.2822215,-0.99088 0.6085946,-1.762064 0.9879496,-2.31355 0.9569273,-1.403344 2.3329461,-2.19697 4.1235252,-2.389736 z"
+ class="fil1"
+ id="_177679352"
+ style="fill:#1f1a17"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 10.220574,27.385101 c 0.0053,-0.369114 0.09516,-0.64905 0.269208,-0.838864 0.180324,-0.196782 0.4493,-0.29541 0.806812,-0.29541 0.703404,0 1.060451,0.37821 1.071373,1.134274 0.886285,0.09957 1.671486,0.346555 2.354673,0.741773 0.692715,0.400888 1.280396,0.954382 1.762229,1.661074 l 3.49e-4,4.73e-4 9.29e-4,0.0013 -1.16e-4,1.18e-4 c 0.05403,0.07855 0.106429,0.160757 0.157203,0.246155 0.05089,0.08563 0.101316,0.176584 0.150929,0.272377 0.252709,0.487822 0.477998,1.089862 0.675286,1.805058 l 0,1.18e-4 0.0012,0.0043 1.16e-4,0 c 0.03869,0.137842 0.07494,0.274621 0.10852,0.409982 0.03346,0.135126 0.06425,0.268361 0.09202,0.399235 0.143377,0.674446 0.214368,1.301054 0.214368,1.87392 l 0,0.945996 c 0,0.436559 0.0373,0.845597 0.111192,1.227586 0.07378,0.381281 0.184275,0.736221 0.330672,1.06494 l -1.16e-4,0 5.81e-4,0.0011 c 0.04171,0.09166 0.08958,0.188868 0.143144,0.291393 0.05438,0.103707 0.114446,0.212374 0.17986,0.325176 0.339502,0.58574 0.839809,1.317118 1.502083,2.19 l 3.48e-4,3.54e-4 0.489502,0.659091 c 0.200309,0.2647 0.350889,0.521131 0.451392,0.76953 0.101316,0.249935 0.15209,0.491601 0.15209,0.725236 l 0,9.45e-4 -1.16e-4,0 c -2.32e-4,0.439512 -0.152323,0.848314 -0.456388,1.225578 l 1.16e-4,1.18e-4 c -0.07355,0.09119 -0.156505,0.181073 -0.248759,0.269188 -0.469749,0.449434 -1.175478,0.849967 -2.117184,1.200774 l -2.33e-4,0 -0.0031,0.0012 0,1.18e-4 c -0.261772,0.09745 -0.534001,0.18816 -0.816107,0.272141 -0.282337,0.08398 -0.574086,0.161229 -0.875247,0.231272 -1.549139,0.360965 -3.360864,0.542392 -5.432735,0.542392 l 0,1.18e-4 -0.0052,0 0,-1.18e-4 c -1.4453836,-2.37e-4 -2.7620301,-0.088 -3.9492428,-0.262337 -0.1924079,-0.02823 -0.3828406,-0.05906 -0.5703686,-0.09225 -0.9602968,-0.16997 -1.83078,-0.401124 -2.6115658,-0.692518 l -1.162e-4,-1.18e-4 -0.00151,-5.91e-4 0,0 C 3.8974869,45.599749 3.6540723,45.498169 3.4288993,45.392809 3.204191,45.287567 2.9972595,45.178191 2.8082211,45.064917 1.8311931,44.479531 1.3423887,43.790911 1.3423887,43.001301 c 0,-0.466206 0.2011221,-0.963005 0.6033662,-1.494766 l 0.4896177,-0.659091 2.324e-4,0 0.00198,-0.0027 1.162e-4,-2.37e-4 c 0.1297824,-0.171151 0.2527097,-0.335923 0.3679685,-0.493373 0.115375,-0.157449 0.2258702,-0.311355 0.3311368,-0.461009 0.5348151,-0.760907 0.9073149,-1.379012 1.1155245,-1.850533 l 0,-1.18e-4 c 0.1463973,-0.328837 0.2558467,-0.683659 0.3285807,-1.064822 0.072734,-0.381753 0.1089846,-0.790791 0.1089846,-1.227704 l 0,-0.945996 0,-0.0034 0,0 c 2.324e-4,-0.39829 0.035902,-0.822801 0.1061962,-1.270935 0.011619,-0.07347 0.023935,-0.147292 0.037064,-0.220878 0.068319,-0.381399 0.1610371,-0.77957 0.2772254,-1.192388 l 1.162e-4,-2.36e-4 c 0.1414012,-0.496326 0.2941889,-0.938555 0.4594088,-1.326214 0.165336,-0.387895 0.3431042,-0.72122 0.5341179,-0.998794 l -1.162e-4,-1.18e-4 c 0.4818331,-0.706692 1.0697462,-1.260186 1.7622288,-1.661074 0.6831876,-0.395336 1.4682723,-0.6422 2.3544413,-0.741773 z m 0.32707,-0.784058 c -0.165336,0.180482 -0.24783,0.453922 -0.24783,0.819966 l 0,0.03626 -0.03567,0.0038 c -0.8895378,0.09579 -1.6762492,0.340767 -2.3588558,0.735749 -0.6820257,0.394746 -1.2612246,0.940208 -1.7362026,1.63686 l -2.324e-4,1.18e-4 C 5.9808604,30.107217 5.8055322,30.4357 5.6424037,30.818634 5.4790429,31.201922 5.3273009,31.64108 5.186713,32.13528 c -0.1157236,0.411164 -0.2079772,0.8065 -0.2755988,1.184592 -0.013246,0.07441 -0.025678,0.147527 -0.036832,0.219342 -0.069597,0.443764 -0.1050343,0.864023 -0.1051505,1.258297 l 1.162e-4,0 0,0.0034 0,0.945996 c 0,0.441756 -0.036715,0.855755 -0.1104951,1.242823 -0.07378,0.387541 -0.1852043,0.748269 -0.3340416,1.082775 -0.2104171,0.476601 -0.5855893,1.099194 -1.123309,1.864117 -0.1034077,0.147291 -0.2142514,0.301434 -0.3321826,0.462309 -0.117815,0.160874 -0.2409746,0.326001 -0.368898,0.494672 l -1.162e-4,-1.18e-4 -0.00163,0.0022 1.162e-4,1.18e-4 -0.4895016,0.659091 -3.486e-4,3.54e-4 c -0.3913224,0.517115 -0.5870997,0.997732 -0.5870997,1.445984 0,0.759254 0.4756751,1.424723 1.4264444,1.994399 0.1859014,0.111384 0.3908577,0.219579 0.6138232,0.323994 0.222733,0.104179 0.4641724,0.204933 0.7238534,0.301906 l 0,1.19e-4 0.00163,7.08e-4 0,-1.18e-4 c 0.7762544,0.28974 1.6422063,0.519595 2.5975069,0.688738 0.1849719,0.0326 0.3747075,0.06343 0.5683935,0.09178 1.1844241,0.173868 2.4972364,0.261628 3.9379725,0.261746 l 0,-1.18e-4 0.0052,0 0,1.18e-4 c 2.065481,0 3.871396,-0.180836 5.415075,-0.540501 0.300695,-0.07004 0.59105,-0.146819 0.870832,-0.230092 0.279897,-0.08315 0.550384,-0.173513 0.810878,-0.270487 l 1.16e-4,0 0.0033,-0.0011 0,-1.18e-4 c 0.931714,-0.347145 1.628612,-0.742009 2.090344,-1.183765 0.08888,-0.08493 0.169635,-0.172332 0.24144,-0.261628 l 2.32e-4,0 c 0.291981,-0.362264 0.438146,-0.754057 0.438263,-1.17467 l -1.17e-4,0 0,-9.45e-4 c 0,-0.223477 -0.04857,-0.455103 -0.1457,-0.694762 -0.09771,-0.24143 -0.245041,-0.491838 -0.441283,-0.751222 l -3.49e-4,-3.54e-4 -0.489501,-0.659091 C 19.426526,40.0211 18.924476,39.287006 18.582882,38.697722 18.515842,38.582204 18.455191,38.47271 18.401396,38.36983 18.346904,38.265887 18.298337,38.16726 18.256044,38.074184 l -5.8e-4,-0.0013 -2.33e-4,-3.55e-4 c -0.14907,-0.334624 -0.261424,-0.695352 -0.336365,-1.082657 -0.07483,-0.38695 -0.112587,-0.801067 -0.112587,-1.242941 l 0,-0.945996 c 0,-0.567432 -0.07041,-1.188371 -0.212508,-1.85703 -0.02777,-0.130519 -0.05821,-0.263045 -0.09144,-0.396635 -0.033,-0.133354 -0.06913,-0.269542 -0.107823,-0.407385 l 0,-3.54e-4 -0.0012,-0.0044 -1.16e-4,0 c -0.19601,-0.709999 -0.419092,-1.306725 -0.669129,-1.789349 -0.04822,-0.09308 -0.09783,-0.182608 -0.148837,-0.268361 -0.05112,-0.08611 -0.102711,-0.167017 -0.154647,-0.242375 l -5.81e-4,-7.09e-4 -8.13e-4,-0.0012 C 15.944361,29.136653 15.365394,28.591545 14.683485,28.196799 14.000994,27.801817 13.214399,27.556843 12.324512,27.46105 l -0.03555,-0.0038 0,-0.03626 c 0,-0.726299 -0.330788,-1.089508 -0.992365,-1.089508 -0.334739,0 -0.584427,0.09001 -0.74895,0.269542 z"
+ class="fil2"
+ id="_177678968"
+ style="fill:#aa4400;fill-rule:nonzero;stroke:#ffffff"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 4.1707619,40.420217 c 1.9887962,-0.89308 4.354856,-1.341687 7.1017811,-1.341687 2.739373,0 5.101482,0.448607 7.086561,1.341687 -0.807742,-1.214712 -1.344997,-2.141573 -1.604097,-2.772198 -0.262818,-0.634877 -0.392368,-1.320426 -0.392368,-2.065269 l -0.03428,-1.142778 c 0,-1.612529 -0.320099,-3.026149 -0.96018,-4.240742 -0.796239,-1.527957 -2.164008,-2.293943 -4.09564,-2.293943 -1.9354656,0 -3.3070692,0.765986 -4.1108603,2.293943 -0.6324132,1.214593 -0.9486779,2.628213 -0.9486779,4.240742 l -0.034276,1.142778 c 0,0.744843 -0.12955,1.426258 -0.3886501,2.052631 -0.2629342,0.62212 -0.800073,1.553233 -1.6193172,2.784836 z"
+ class="fil3 str0"
+ id="_177679040"
+ style="fill:#ffcc00;stroke:#1f1a17;stroke-width:0.08926718000000000"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="2.5232899"
+ rx="7.4754901"
+ cy="46.356499"
+ cx="84.788902"
+ class="fil3 str0"
+ id="_177539448"
+ sodipodi:cx="84.788902"
+ sodipodi:cy="46.356499"
+ sodipodi:rx="7.4754901"
+ sodipodi:ry="2.5232899"
+ style="fill:#ffcc00;stroke:#1f1a17;stroke-width:0.07620000000000000"
+ d="m 92.264392,46.356499 c 0,1.393574 -3.346891,2.52329 -7.47549,2.52329 -4.128599,0 -7.47549,-1.129716 -7.47549,-2.52329 0,-1.393575 3.346891,-2.52329 7.47549,-2.52329 4.128599,0 7.47549,1.129715 7.47549,2.52329 z"
+ transform="matrix(1.1618836,0,0,1.1811663,-87.404953,-11.883599)"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="1.5911"
+ rx="1.9198999"
+ transform="matrix(1.0210192,-0.2105488,0.20711156,1.0379641,14.589605,42.495053)"
+ class="fil1 str0"
+ id="_177539568"
+ cx="0"
+ cy="0"
+ sodipodi:cx="0"
+ sodipodi:cy="0"
+ sodipodi:rx="1.9198999"
+ sodipodi:ry="1.5911"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.0762"
+ d="M 1.9198999,0 C 1.9198999,0.87874025 1.0603315,1.5911 0,1.5911 -1.0603315,1.5911 -1.9198999,0.87874025 -1.9198999,0 c 0,-0.87874025 0.8595684,-1.5911 1.9198999,-1.5911 1.0603315,0 1.9198999,0.71235975 1.9198999,1.5911 z"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <rect
+ height="1.9762512"
+ width="1.3709967"
+ transform="matrix(0.97696548,-0.21339738,0.206787,0.97838598,0,0)"
+ class="fil1 str0"
+ id="_177729920"
+ x="4.7547421"
+ y="41.611019"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.08004317"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 35.837202,27.327815 c 0,-0.75323 0.344034,-1.129786 1.036517,-1.129786 0.688067,0 1.031985,0.376556 1.031985,1.129786 1.790579,0.192766 3.166597,0.986392 4.123641,2.389736 0.379355,0.551486 0.705728,1.32267 0.979119,2.31355 0.277806,0.986392 0.414676,1.883133 0.414676,2.676641 l 0,0.945996 c 0,0.878788 0.149883,1.645483 0.44535,2.309062 0.299883,0.659091 0.908593,1.600598 1.830316,2.815664 l 0.489617,0.659091 c 0.3969,0.524556 0.595349,1.013204 0.595349,1.470552 0,1.076043 -0.930668,1.963807 -2.796189,2.658805 -1.865636,0.694999 -4.238319,1.044624 -7.113864,1.044624 -2.888791,0 -5.26159,-0.349625 -7.122812,-1.044624 -1.861105,-0.694998 -2.791657,-1.582762 -2.791657,-2.658805 0,-0.457348 0.198449,-0.945996 0.595349,-1.470552 L 28.0441,40.778464 c 0.921839,-1.215066 1.530434,-2.156573 1.821602,-2.815664 0.295467,-0.663579 0.440934,-1.430274 0.440934,-2.309062 l 0,-0.945996 c 0,-0.793508 0.141169,-1.690249 0.419092,-2.676641 0.282221,-0.99088 0.608594,-1.762064 0.987949,-2.31355 0.956928,-1.403344 2.332947,-2.19697 4.123525,-2.389736 z"
+ class="fil1"
+ id="_177682800"
+ style="fill:#1f1a17"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 35.797698,27.291907 c 0.0058,-0.369114 0.09516,-0.64905 0.269209,-0.838864 0.180324,-0.196782 0.4493,-0.29541 0.806812,-0.29541 0.703404,0 1.060451,0.37821 1.071373,1.134274 0.886284,0.09957 1.671485,0.346555 2.354673,0.741773 0.692715,0.400888 1.280396,0.954382 1.762229,1.661074 l 3.48e-4,4.73e-4 9.3e-4,0.0013 -1.16e-4,1.18e-4 c 0.05403,0.07855 0.106428,0.160757 0.157202,0.246155 0.05089,0.08563 0.101317,0.176584 0.150929,0.272377 0.25271,0.487822 0.477999,1.089862 0.675287,1.805058 l 0,1.18e-4 0.0012,0.0043 1.16e-4,0 c 0.03869,0.137842 0.07494,0.274621 0.10852,0.409982 0.03346,0.135126 0.06425,0.268361 0.09202,0.399235 0.143377,0.674446 0.214368,1.301054 0.214368,1.87392 l 0,0.945996 c 0,0.436559 0.0373,0.845597 0.111192,1.227586 0.07378,0.381281 0.184275,0.736221 0.330672,1.06494 l -1.16e-4,0 5.81e-4,0.0011 c 0.04171,0.09166 0.08958,0.188868 0.143144,0.291393 0.05438,0.103707 0.114445,0.212374 0.179859,0.325176 0.339503,0.58574 0.83981,1.317118 1.502083,2.19 l 3.49e-4,3.54e-4 0.489502,0.659091 c 0.200308,0.2647 0.350888,0.521131 0.451391,0.76953 0.101317,0.249935 0.152091,0.491601 0.152091,0.725236 l 0,9.45e-4 -1.16e-4,0 c -2.33e-4,0.439512 -0.152323,0.848314 -0.456388,1.225578 l 1.16e-4,1.18e-4 c -0.07355,0.09119 -0.156506,0.181073 -0.248759,0.269188 -0.46975,0.449434 -1.175478,0.849967 -2.117185,1.200774 l -2.32e-4,0 -0.0035,0.0012 0,1.18e-4 c -0.261772,0.09745 -0.534001,0.18816 -0.816107,0.272141 -0.282337,0.08398 -0.574086,0.161229 -0.875247,0.231272 -1.549139,0.360965 -3.360864,0.542392 -5.432735,0.542392 l 0,1.18e-4 -0.0046,0 0,-1.18e-4 c -1.445384,-2.37e-4 -2.76203,-0.088 -3.949243,-0.262337 -0.192408,-0.02823 -0.38284,-0.05906 -0.570368,-0.09225 -0.960297,-0.16997 -1.83078,-0.401125 -2.611566,-0.692518 l -1.16e-4,-1.18e-4 -0.0012,-5.91e-4 0,0 c -0.261076,-0.09745 -0.50449,-0.199026 -0.729663,-0.304387 -0.224708,-0.105241 -0.43164,-0.214617 -0.620678,-0.327891 -0.977028,-0.585386 -1.465833,-1.274006 -1.465833,-2.063616 0,-0.466206 0.201122,-0.963005 0.603366,-1.494766 l 0.489618,-0.659091 2.33e-4,0 0.002,-0.0027 1.16e-4,-2.37e-4 c 0.129782,-0.171151 0.25271,-0.335923 0.367968,-0.493373 0.115376,-0.157449 0.225871,-0.311355 0.331137,-0.461009 0.534815,-0.760907 0.907315,-1.379012 1.115525,-1.850533 l 0,-1.18e-4 c 0.146397,-0.328837 0.255847,-0.683659 0.32858,-1.064822 0.07273,-0.381753 0.108985,-0.790791 0.108985,-1.227704 l 0,-0.945996 0,-0.0034 0,0 c 2.32e-4,-0.39829 0.0359,-0.822801 0.106196,-1.270935 0.01162,-0.07347 0.02394,-0.147292 0.03706,-0.220878 0.06832,-0.381399 0.161037,-0.77957 0.277226,-1.192388 l 1.16e-4,-2.36e-4 c 0.141401,-0.496326 0.294189,-0.938555 0.459409,-1.326214 0.165336,-0.387895 0.343104,-0.72122 0.534118,-0.998794 l -1.17e-4,-1.18e-4 c 0.481834,-0.706692 1.069747,-1.260186 1.762229,-1.661074 0.683188,-0.395336 1.468273,-0.6422 2.354441,-0.741773 z m 0.327071,-0.784058 c -0.165337,0.180482 -0.24783,0.453922 -0.24783,0.819966 l 0,0.03626 -0.03567,0.0038 c -0.889538,0.09579 -1.67625,0.340767 -2.358856,0.735749 -0.682026,0.394746 -1.261225,0.940208 -1.736203,1.63686 l -2.32e-4,1.18e-4 c -0.187993,0.27344 -0.363321,0.601923 -0.52645,0.984857 -0.16336,0.383288 -0.315102,0.822446 -0.45569,1.316646 -0.115724,0.411164 -0.207978,0.8065 -0.275599,1.184592 -0.01325,0.07441 -0.02568,0.147527 -0.03683,0.219342 -0.0696,0.443764 -0.105034,0.864023 -0.10515,1.258297 l 1.16e-4,0 0,0.0034 0,0.945996 c 0,0.441756 -0.03672,0.855755 -0.110495,1.242823 -0.07378,0.387541 -0.185205,0.748269 -0.334042,1.082775 -0.210417,0.476601 -0.585589,1.099194 -1.123309,1.864117 -0.103408,0.147291 -0.214251,0.301434 -0.332182,0.462308 -0.117815,0.160875 -0.240975,0.326002 -0.368898,0.494673 l -1.17e-4,-1.18e-4 -0.0016,0.0022 1.16e-4,1.18e-4 -0.489502,0.659091 -3.48e-4,3.54e-4 c -0.391323,0.517115 -0.5871,0.997731 -0.5871,1.445984 0,0.759254 0.475675,1.424723 1.426444,1.994399 0.185902,0.111384 0.390858,0.219579 0.613824,0.323994 0.222733,0.104179 0.464172,0.204933 0.723853,0.301906 l 0,1.19e-4 0.0012,7.08e-4 0,-1.18e-4 c 0.776254,0.28974 1.642206,0.519595 2.597507,0.688738 0.184972,0.0326 0.374707,0.06343 0.568393,0.09178 1.184425,0.173867 2.497237,0.261628 3.937972,0.261746 l 0,-1.18e-4 0.0046,0 0,1.18e-4 c 2.06548,0 3.871396,-0.180836 5.415075,-0.540501 0.300695,-0.07004 0.59105,-0.146819 0.870831,-0.230092 0.279898,-0.08315 0.550385,-0.173513 0.810879,-0.270487 l 1.16e-4,0 0.0035,-0.0011 0,-1.18e-4 c 0.931714,-0.347145 1.628612,-0.742009 2.090345,-1.183765 0.08888,-0.08493 0.169635,-0.172332 0.241439,-0.261628 l 2.32e-4,0 c 0.291982,-0.362264 0.438147,-0.754057 0.438263,-1.17467 l -1.16e-4,0 0,-9.45e-4 c 0,-0.223477 -0.04857,-0.455103 -0.1457,-0.694762 -0.09772,-0.24143 -0.245042,-0.491838 -0.441284,-0.751222 l -3.48e-4,-3.54e-4 -0.489502,-0.659091 c -0.663552,-0.874772 -1.165602,-1.608866 -1.507195,-2.19815 -0.06704,-0.115518 -0.127691,-0.225013 -0.181487,-0.327892 -0.05449,-0.103943 -0.103059,-0.20257 -0.145351,-0.295646 l -5.81e-4,-0.0013 -2.33e-4,-3.55e-4 c -0.149069,-0.334624 -0.261423,-0.695352 -0.336365,-1.082657 -0.07482,-0.38695 -0.112586,-0.801067 -0.112586,-1.242941 l 0,-0.945996 c 0,-0.567432 -0.07041,-1.188371 -0.212509,-1.85703 -0.02777,-0.130519 -0.05821,-0.263045 -0.09144,-0.396635 -0.033,-0.133354 -0.06913,-0.269543 -0.107823,-0.407385 l 0,-3.54e-4 -0.0012,-0.0044 -1.16e-4,0 c -0.19601,-0.709999 -0.419091,-1.306725 -0.669129,-1.789349 -0.04822,-0.09308 -0.09783,-0.182608 -0.148837,-0.268361 -0.05112,-0.08611 -0.102711,-0.167017 -0.154647,-0.242375 l -5.81e-4,-7.09e-4 -8.13e-4,-0.0012 c -0.474862,-0.696534 -1.053828,-1.241642 -1.735738,-1.636388 -0.68249,-0.394982 -1.469086,-0.639956 -2.358972,-0.735749 l -0.03555,-0.0038 0,-0.03626 c 0,-0.726299 -0.330788,-1.089508 -0.992365,-1.089508 -0.334738,0 -0.584427,0.09001 -0.74895,0.269542 z"
+ class="fil2"
+ id="_177683472"
+ style="fill:#1f1a17;fill-rule:nonzero;stroke:#ffffff"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 29.74777,40.327022 c 1.988797,-0.893079 4.354856,-1.341686 7.101782,-1.341686 2.739372,0 5.101482,0.448607 7.08656,1.341686 -0.807742,-1.214711 -1.344996,-2.141572 -1.604097,-2.772197 -0.262818,-0.634877 -0.392368,-1.320426 -0.392368,-2.065269 l -0.03428,-1.142778 c 0,-1.612529 -0.320099,-3.026149 -0.960181,-4.240742 -0.796239,-1.527957 -2.164008,-2.293943 -4.095639,-2.293943 -1.935466,0 -3.30707,0.765986 -4.110861,2.293943 -0.632413,1.214593 -0.948678,2.628213 -0.948678,4.240742 l -0.03427,1.142778 c 0,0.744843 -0.12955,1.426258 -0.38865,2.052631 -0.262935,0.62212 -0.800073,1.553233 -1.619318,2.784835 z"
+ class="fil3 str0"
+ id="_177679088"
+ style="fill:#00ff00;stroke:#1f1a17;stroke-width:0.08926718000000000"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="2.5232899"
+ rx="7.4754901"
+ cy="46.277599"
+ cx="106.802"
+ class="fil3 str0"
+ id="_177593360"
+ sodipodi:cx="106.802"
+ sodipodi:cy="46.277599"
+ sodipodi:rx="7.4754901"
+ sodipodi:ry="2.5232899"
+ style="fill:#00ff00;stroke:#1f1a17;stroke-width:0.07620000000000000"
+ d="m 114.27749,46.277599 c 0,1.393575 -3.34689,2.52329 -7.47549,2.52329 -4.1286,0 -7.475488,-1.129715 -7.475488,-2.52329 0,-1.393574 3.346888,-2.52329 7.475488,-2.52329 4.1286,0 7.47549,1.129716 7.47549,2.52329 z"
+ transform="matrix(1.1618836,0,0,1.1811663,-87.404953,-11.883599)"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="1.5911"
+ rx="1.9198999"
+ transform="matrix(1.0210192,-0.2105488,0.20711156,1.0379641,40.166381,42.401859)"
+ class="fil1 str0"
+ id="_177368592"
+ cx="0"
+ cy="0"
+ sodipodi:cx="0"
+ sodipodi:cy="0"
+ sodipodi:rx="1.9198999"
+ sodipodi:ry="1.5911"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.0762"
+ d="M 1.9198999,0 C 1.9198999,0.87874025 1.0603315,1.5911 0,1.5911 -1.0603315,1.5911 -1.9198999,0.87874025 -1.9198999,0 c 0,-0.87874025 0.8595684,-1.5911 1.9198999,-1.5911 1.0603315,0 1.9198999,0.71235975 1.9198999,1.5911 z"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <rect
+ height="1.9762512"
+ width="1.3709967"
+ transform="matrix(0.97696548,-0.21339738,0.206787,0.97838598,0,0)"
+ class="fil1 str0"
+ id="_177576336"
+ x="29.798658"
+ y="46.978134"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.08004317"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 10.278319,2.9062567 c 0,-0.7532297 0.344034,-1.1297856 1.036517,-1.1297856 0.688067,0 1.031985,0.3765559 1.031985,1.1297856 1.790578,0.1927663 3.166597,0.986392 4.123641,2.3897357 0.379355,0.5514865 0.705728,1.32267 0.979119,2.3135504 0.277806,0.986392 0.414676,1.8831334 0.414676,2.6766412 l 0,0.945996 c 0,0.878788 0.149883,1.645483 0.44535,2.309062 0.299882,0.659091 0.908593,1.600598 1.830316,2.815664 l 0.489617,0.659091 c 0.3969,0.524556 0.595349,1.013204 0.595349,1.470552 0,1.076042 -0.930668,1.963807 -2.796189,2.658805 -1.865636,0.694998 -4.238319,1.044624 -7.113864,1.044624 -2.8887916,0 -5.2615902,-0.349626 -7.1228116,-1.044624 -1.8611051,-0.694998 -2.7916577,-1.582763 -2.7916577,-2.658805 0,-0.457348 0.1984497,-0.945996 0.5953491,-1.470552 L 2.4852174,16.356906 C 3.4070559,15.14184 4.0156505,14.200333 4.3068185,13.541242 4.6022855,12.877663 4.7477533,12.110968 4.7477533,11.23218 l 0,-0.945996 c 0,-0.7935078 0.1411689,-1.6902492 0.4190915,-2.6766412 C 5.4490663,6.6186624 5.7754394,5.8474789 6.1547944,5.2959924 7.1117217,3.8926487 8.4877405,3.099023 10.278319,2.9062567 z"
+ class="fil1"
+ id="_178452872"
+ style="fill:#1f1a17"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 10.238815,2.8703493 c 0.0053,-0.3691145 0.09516,-0.6490509 0.269209,-0.8388644 0.180324,-0.1967823 0.4493,-0.2954096 0.806812,-0.2954096 0.703404,0 1.060451,0.3782094 1.071373,1.134274 0.886284,0.099572 1.671485,0.3465541 2.354673,0.7417724 0.692715,0.4008878 1.280396,0.9543824 1.762229,1.6610742 l 3.48e-4,4.724e-4 9.3e-4,0.0013 -1.16e-4,1.181e-4 c 0.05403,0.078548 0.106428,0.1607568 0.157202,0.2461551 0.05089,0.085634 0.101317,0.1765843 0.150929,0.2723769 0.25271,0.4878217 0.477999,1.0898622 0.675287,1.8050584 l 0,1.181e-4 0.0012,0.00425 1.16e-4,0 c 0.03869,0.1378421 0.07494,0.2746211 0.10852,0.4099828 0.03346,0.1351254 0.06425,0.268361 0.09202,0.3992342 0.143376,0.674446 0.214368,1.3010547 0.214368,1.8739206 l 0,0.945996 c 0,0.436559 0.0373,0.845597 0.111192,1.227586 0.07378,0.38128 0.184275,0.736221 0.330672,1.06494 l -1.16e-4,0 5.81e-4,0.0011 c 0.04171,0.09166 0.08958,0.188868 0.143144,0.291393 0.05438,0.103707 0.114445,0.212374 0.179859,0.325175 0.339503,0.585741 0.83981,1.317119 1.502083,2.190001 l 3.49e-4,3.54e-4 0.489502,0.659091 c 0.200308,0.264699 0.350888,0.521131 0.451391,0.76953 0.101317,0.249935 0.152091,0.491601 0.152091,0.725236 l 0,9.45e-4 -1.16e-4,0 c -2.33e-4,0.439512 -0.152323,0.848313 -0.456388,1.225578 l 1.16e-4,1.18e-4 c -0.07355,0.09119 -0.156506,0.181073 -0.248759,0.269188 -0.46975,0.449434 -1.175478,0.849967 -2.117185,1.200774 l -2.32e-4,0 -0.0031,0.0012 0,1.18e-4 c -0.261772,0.09745 -0.534002,0.18816 -0.816107,0.272141 -0.282338,0.08398 -0.574087,0.161229 -0.875247,0.231272 -1.549139,0.360964 -3.360865,0.542391 -5.432735,0.542391 l 0,1.19e-4 -0.0052,0 0,-1.19e-4 C 9.864224,22.230019 8.5475775,22.142259 7.3603648,21.967918 7.1679569,21.939689 6.9775242,21.90886 6.7899961,21.875669 5.8296994,21.7057 4.9592162,21.474545 4.1784304,21.183152 l -1.162e-4,-1.19e-4 -0.00151,-5.9e-4 0,0 C 3.9157285,21.084997 3.6723139,20.983416 3.4471408,20.878056 3.2224326,20.772814 3.0155011,20.663438 2.8264626,20.550165 1.8494347,19.964779 1.3606303,19.276159 1.3606303,18.486549 c 0,-0.466206 0.201122,-0.963005 0.6033661,-1.494766 l 0.4896178,-0.659091 2.324e-4,0 0.00198,-0.0027 1.161e-4,-2.36e-4 c 0.1297824,-0.171151 0.2527097,-0.335923 0.3679686,-0.493373 0.115375,-0.157449 0.2258702,-0.311355 0.3311368,-0.461009 0.534815,-0.760907 0.9073149,-1.379012 1.1155244,-1.850533 l 0,-1.18e-4 c 0.1463974,-0.328837 0.2558468,-0.68366 0.3285807,-1.064822 0.072734,-0.381753 0.1089847,-0.790791 0.1089847,-1.227704 l 0,-0.945996 0,-0.0034 0,0 C 4.7083655,9.8844691 4.7440353,9.4599579 4.8143293,9.0118234 4.8259481,8.9383549 4.8382641,8.864532 4.8513934,8.7909453 4.9197121,8.4095467 5.0124304,8.0113756 5.1286188,7.598558 L 5.128735,7.5983217 C 5.2701362,7.1019956 5.4229239,6.659767 5.5881438,6.2721082 5.7534798,5.8842132 5.931248,5.5508881 6.1222616,5.273314 L 6.1221455,5.2731959 C 6.6039786,4.5665041 7.1918917,4.0130095 7.8843743,3.6121217 8.5675619,3.2167853 9.3526466,2.9699216 10.238815,2.8703493 z m 0.32707,-0.7840582 c -0.165336,0.1804822 -0.247829,0.4539222 -0.247829,0.8199656 l 0,0.036262 -0.03567,0.00378 C 9.3928478,3.0420908 8.6061364,3.2870647 7.9235298,3.6820467 7.2415041,4.0767925 6.6623051,4.6222551 6.1873271,5.318907 l -2.324e-4,1.181e-4 C 5.999102,5.5924651 5.8237737,5.9209475 5.6606453,6.3038816 5.4972845,6.68717 5.3455425,7.1263277 5.2049545,7.6205276 5.0892309,8.0316916 4.9969774,8.427028 4.9293558,8.8051193 4.9161103,8.8795328 4.9036781,8.952647 4.892524,9.0244619 4.8229272,9.4682261 4.7874898,9.8884851 4.7873736,10.282758 l 1.162e-4,0 0,0.0034 0,0.945996 c 0,0.441756 -0.036716,0.855755 -0.1104952,1.242823 -0.07378,0.387541 -0.1852042,0.748269 -0.3340415,1.082775 -0.2104171,0.476601 -0.5855893,1.099194 -1.1233091,1.864117 -0.1034076,0.147291 -0.2142513,0.301433 -0.3321825,0.462308 -0.117815,0.160875 -0.2409746,0.326002 -0.368898,0.494673 l -1.162e-4,-1.18e-4 -0.00163,0.0022 1.162e-4,1.18e-4 -0.4895015,0.659091 -3.486e-4,3.54e-4 c -0.3913224,0.517115 -0.5870998,0.997731 -0.5870998,1.445984 0,0.759254 0.4756752,1.424723 1.4264445,1.994399 0.1859014,0.111384 0.3908577,0.219579 0.6138231,0.323994 0.2227331,0.104179 0.4641725,0.204932 0.7238535,0.301906 l 0,1.18e-4 0.00163,7.09e-4 0,-1.18e-4 c 0.7762545,0.28974 1.6422063,0.519595 2.597507,0.688738 0.1849719,0.0326 0.3747075,0.06343 0.5683935,0.09178 1.1844241,0.173867 2.4972364,0.261628 3.9379719,0.261746 l 0,-1.18e-4 0.0052,0 0,1.18e-4 c 2.06548,0 3.871396,-0.180836 5.415074,-0.540502 0.300696,-0.07004 0.591051,-0.146819 0.870832,-0.230091 0.279898,-0.08315 0.550384,-0.173513 0.810879,-0.270487 l 1.16e-4,0 0.0033,-0.0011 0,-1.18e-4 c 0.931715,-0.347145 1.628612,-0.742009 2.090345,-1.183765 0.08888,-0.08493 0.169635,-0.172332 0.241439,-0.261628 l 2.33e-4,0 c 0.291981,-0.362264 0.438146,-0.754057 0.438262,-1.17467 l -1.16e-4,0 0,-9.45e-4 c 0,-0.223477 -0.04857,-0.455103 -0.1457,-0.694762 -0.09772,-0.241431 -0.245041,-0.491838 -0.441284,-0.751222 l -3.48e-4,-3.54e-4 -0.489502,-0.659091 c -0.663551,-0.874772 -1.165601,-1.608867 -1.507195,-2.198151 -0.06704,-0.115518 -0.127691,-0.225012 -0.181486,-0.327891 -0.05449,-0.103943 -0.103059,-0.20257 -0.145352,-0.295646 l -5.81e-4,-0.0013 -2.32e-4,-3.55e-4 c -0.14907,-0.334624 -0.261424,-0.695352 -0.336366,-1.082657 -0.07483,-0.38695 -0.112586,-0.801067 -0.112586,-1.242941 l 0,-0.945996 c 0,-0.5674325 -0.07041,-1.1883717 -0.212509,-1.8570299 -0.02777,-0.1305189 -0.05821,-0.2630457 -0.09144,-0.3966356 -0.033,-0.1333537 -0.06913,-0.2695422 -0.107823,-0.4073843 l 0,-3.544e-4 -0.0012,-0.00437 -1.16e-4,0 C 17.215462,6.9104105 16.99238,6.3136853 16.742342,5.8310607 16.694124,5.7379848 16.644512,5.6484524 16.593505,5.5626997 16.542382,5.4765927 16.490795,5.3956828 16.438859,5.3203244 l -5.81e-4,-7.087e-4 -8.14e-4,-0.00118 C 15.962602,4.6219008 15.383636,4.0767925 14.701726,3.6820467 14.019236,3.2870647 13.232641,3.0420908 12.342754,2.9462982 l -0.03555,-0.00378 0,-0.036262 c 0,-0.7262991 -0.330788,-1.0895078 -0.992364,-1.0895078 -0.334739,0 -0.584428,0.090005 -0.748951,0.2695422 z"
+ class="fil2"
+ id="_178452968"
+ style="fill:#2b0000;fill-rule:nonzero;stroke:#ffffff"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 4.1890035,15.905464 c 1.9887962,-0.89308 4.3548559,-1.341686 7.1017815,-1.341686 2.739373,0 5.101482,0.448606 7.08656,1.341686 -0.807741,-1.214711 -1.344996,-2.141572 -1.604096,-2.772197 -0.262818,-0.634877 -0.392368,-1.320426 -0.392368,-2.065269 l -0.03428,-1.1427787 c 0,-1.6125282 -0.320099,-3.026148 -0.960181,-4.2407413 -0.796238,-1.5279568 -2.164008,-2.2939431 -4.095639,-2.2939431 -1.9354661,0 -3.3070696,0.7659863 -4.1108607,2.2939431 -0.6324133,1.2145933 -0.948678,2.6282131 -0.948678,4.2407413 l -0.034275,1.1427787 c 0,0.744843 -0.1295501,1.426258 -0.3886501,2.052631 C 5.5453829,13.742749 5.0082441,14.673862 4.189,15.905464 z"
+ class="fil3 str0"
+ id="_178453064"
+ style="fill:#ff0000;stroke:#ff0000;stroke-width:0.08926718000000000"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="2.5232899"
+ rx="7.4754901"
+ cy="25.601801"
+ cx="84.804604"
+ class="fil3 str0"
+ id="_178453136"
+ sodipodi:cx="84.804604"
+ sodipodi:cy="25.601801"
+ sodipodi:rx="7.4754901"
+ sodipodi:ry="2.5232899"
+ style="fill:#ff0000;stroke:#1f1a17;stroke-width:0.07620000000000000"
+ d="m 92.280094,25.601801 c 0,1.393574 -3.346891,2.52329 -7.47549,2.52329 -4.1286,0 -7.475491,-1.129716 -7.475491,-2.52329 0,-1.393575 3.346891,-2.52329 7.475491,-2.52329 4.128599,0 7.47549,1.129715 7.47549,2.52329 z"
+ transform="matrix(1.1618836,0,0,1.1811663,-87.404953,-11.883599)"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="1.5911"
+ rx="1.9198999"
+ transform="matrix(1.0210192,-0.2105488,0.20711156,1.0379641,14.607846,17.980301)"
+ class="fil1 str0"
+ id="_178453208"
+ cx="0"
+ cy="0"
+ sodipodi:cx="0"
+ sodipodi:cy="0"
+ sodipodi:rx="1.9198999"
+ sodipodi:ry="1.5911"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.0762"
+ d="M 1.9198999,0 C 1.9198999,0.87874025 1.0603315,1.5911 0,1.5911 -1.0603315,1.5911 -1.9198999,0.87874025 -1.9198999,0 c 0,-0.87874025 0.8595684,-1.5911 1.9198999,-1.5911 1.0603315,0 1.9198999,0.71235975 1.9198999,1.5911 z"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <rect
+ height="1.9762512"
+ width="1.3709967"
+ transform="matrix(0.97696548,-0.21339738,0.206787,0.97838598,0,0)"
+ class="fil1 str0"
+ id="_178453280"
+ x="9.8420372"
+ y="17.664297"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.08004317"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 35.854631,2.8130627 c 0,-0.7532298 0.344033,-1.1297856 1.036516,-1.1297856 0.688067,0 1.031985,0.3765558 1.031985,1.1297856 1.790579,0.1927663 3.166598,0.986392 4.123641,2.3897356 0.379355,0.5514866 0.705728,1.3226701 0.979119,2.3135505 0.277807,0.986392 0.414677,1.8831334 0.414677,2.6766412 l 0,0.945996 c 0,0.878788 0.149883,1.645483 0.44535,2.309062 0.299882,0.659091 0.908593,1.600598 1.830315,2.815664 l 0.489618,0.659091 c 0.396899,0.524556 0.595349,1.013204 0.595349,1.470552 0,1.076042 -0.930669,1.963807 -2.796189,2.658805 -1.865637,0.694998 -4.238319,1.044624 -7.113865,1.044624 -2.888791,0 -5.26159,-0.349626 -7.122811,-1.044624 -1.861105,-0.694998 -2.791658,-1.582763 -2.791658,-2.658805 0,-0.457348 0.19845,-0.945996 0.595349,-1.470552 l 0.489502,-0.659091 c 0.921838,-1.215066 1.530433,-2.156573 1.821601,-2.815664 0.295467,-0.663579 0.440935,-1.430274 0.440935,-2.309062 l 0,-0.945996 c 0,-0.7935078 0.141169,-1.6902492 0.419091,-2.6766412 0.282222,-0.9908804 0.608595,-1.7620639 0.98795,-2.3135505 0.956927,-1.4033436 2.332946,-2.1969693 4.123525,-2.3897356 z"
+ class="fil1"
+ id="_177704056"
+ style="fill:#1f1a17"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 35.815127,2.7771552 c 0.0058,-0.3691144 0.09516,-0.6490508 0.269208,-0.8388643 0.180324,-0.1967823 0.4493,-0.2954097 0.806812,-0.2954097 0.703404,0 1.060451,0.3782095 1.071373,1.134274 0.886285,0.099572 1.671486,0.3465542 2.354673,0.7417725 0.692715,0.4008878 1.280396,0.9543823 1.762229,1.6610741 l 3.49e-4,4.725e-4 9.29e-4,0.0013 -1.16e-4,1.181e-4 c 0.05403,0.078548 0.106428,0.1607567 0.157203,0.2461551 0.05089,0.085635 0.101316,0.1765843 0.150928,0.2723769 0.25271,0.4878217 0.477999,1.0898622 0.675287,1.8050583 l 0,1.182e-4 0.0012,0.00425 1.16e-4,0 c 0.03869,0.1378421 0.07494,0.2746211 0.10852,0.4099828 0.03346,0.1351254 0.06425,0.268361 0.09202,0.3992342 0.143377,0.674446 0.214368,1.3010547 0.214368,1.8739206 l 0,0.945996 c 0,0.436559 0.0373,0.845597 0.111192,1.227586 0.07378,0.38128 0.184275,0.736221 0.330672,1.064939 l -1.16e-4,0 5.81e-4,0.0011 c 0.04171,0.09166 0.08958,0.188868 0.143144,0.291393 0.05438,0.103707 0.114446,0.212374 0.17986,0.325175 0.339502,0.585741 0.839809,1.317119 1.502083,2.190001 l 3.48e-4,3.54e-4 0.489502,0.659091 c 0.200309,0.264699 0.350889,0.521131 0.451392,0.76953 0.101316,0.249935 0.15209,0.491601 0.15209,0.725236 l 0,9.45e-4 -1.16e-4,0 c -2.32e-4,0.439512 -0.152323,0.848313 -0.456388,1.225578 l 1.16e-4,1.18e-4 c -0.07355,0.09119 -0.156505,0.181073 -0.248759,0.269188 -0.46975,0.449434 -1.175478,0.849967 -2.117184,1.200774 l -2.33e-4,0 -0.0035,0.0012 0,1.18e-4 c -0.261773,0.09745 -0.534002,0.18816 -0.816107,0.272141 -0.282338,0.08398 -0.574087,0.161229 -0.875247,0.231272 -1.54914,0.360964 -3.360865,0.542391 -5.432736,0.542391 l 0,1.19e-4 -0.0046,0 0,-1.19e-4 c -1.445383,-2.36e-4 -2.76203,-0.088 -3.949243,-0.262337 -0.192407,-0.02823 -0.38284,-0.05906 -0.570368,-0.09225 -0.960297,-0.169969 -1.83078,-0.401124 -2.611566,-0.692517 l -1.16e-4,-1.19e-4 -0.0012,-5.9e-4 0,0 c -0.261075,-0.09745 -0.50449,-0.199027 -0.729663,-0.304387 -0.224708,-0.105242 -0.43164,-0.214618 -0.620678,-0.327891 -0.977028,-0.585386 -1.465832,-1.274006 -1.465832,-2.063616 0,-0.466206 0.201122,-0.963005 0.603366,-1.494766 l 0.489617,-0.659091 2.33e-4,0 0.002,-0.0027 1.16e-4,-2.36e-4 c 0.129783,-0.171151 0.25271,-0.335923 0.367969,-0.493373 0.115375,-0.157449 0.22587,-0.311355 0.331137,-0.461009 0.534815,-0.760907 0.907314,-1.379012 1.115524,-1.850533 l 0,-1.19e-4 c 0.146397,-0.328836 0.255847,-0.683659 0.328581,-1.064821 0.07273,-0.381753 0.108984,-0.790791 0.108984,-1.227704 l 0,-0.945996 0,-0.0034 0,0 c 2.33e-4,-0.3982889 0.0359,-0.8228001 0.106197,-1.2709346 0.01162,-0.073469 0.02393,-0.1472914 0.03706,-0.2208781 0.06832,-0.3813986 0.161037,-0.7795697 0.277225,-1.1923874 l 1.16e-4,-2.362e-4 C 30.847028,7.0088016 30.999816,6.566573 31.165036,6.1789142 31.330372,5.7910192 31.50814,5.457694 31.699154,5.18012 l -1.16e-4,-1.182e-4 C 32.180871,4.47331 32.768784,3.9198155 33.461267,3.5189277 34.144454,3.1235913 34.929539,2.8767276 35.815707,2.7771552 z m 0.32707,-0.7840582 c -0.165336,0.1804823 -0.24783,0.4539223 -0.24783,0.8199657 l 0,0.036262 -0.03567,0.00378 c -0.889538,0.095793 -1.676249,0.3407665 -2.358856,0.7357485 -0.682026,0.3947458 -1.261225,0.9402084 -1.736203,1.6368603 l -2.32e-4,1.181e-4 c -0.187993,0.27344 -0.363321,0.6019223 -0.526449,0.9848564 -0.163361,0.3832885 -0.315103,0.8224461 -0.455691,1.3166461 -0.115724,0.411164 -0.207977,0.8065004 -0.275599,1.1845917 -0.01324,0.074413 -0.02568,0.1475277 -0.03683,0.2193426 -0.0696,0.4437642 -0.105034,0.8640231 -0.10515,1.2582961 l 1.16e-4,0 0,0.0034 0,0.945996 c 0,0.441756 -0.03671,0.855755 -0.110495,1.242823 -0.07378,0.387541 -0.185204,0.748269 -0.334042,1.082775 -0.210417,0.476601 -0.585589,1.099194 -1.123309,1.864117 -0.103407,0.147291 -0.214251,0.301433 -0.332182,0.462308 -0.117815,0.160875 -0.240975,0.326002 -0.368898,0.494673 l -1.16e-4,-1.18e-4 -0.0016,0.0022 1.16e-4,1.18e-4 -0.489501,0.659091 -3.49e-4,3.54e-4 c -0.391322,0.517115 -0.5871,0.997731 -0.5871,1.445984 0,0.759254 0.475675,1.424723 1.426445,1.994399 0.185901,0.111384 0.390857,0.219579 0.613823,0.323994 0.222733,0.104179 0.464172,0.204932 0.723853,0.301906 l 0,1.18e-4 0.0012,7.09e-4 0,-1.18e-4 c 0.776255,0.28974 1.642206,0.519595 2.597507,0.688738 0.184972,0.0326 0.374708,0.06343 0.568394,0.09178 1.184424,0.173867 2.497236,0.261628 3.937972,0.261746 l 0,-1.18e-4 0.0046,0 0,1.18e-4 c 2.065481,0 3.871396,-0.180837 5.415075,-0.540502 0.300695,-0.07004 0.59105,-0.146819 0.870832,-0.230091 0.279897,-0.08315 0.550384,-0.173513 0.810878,-0.270487 l 1.16e-4,0 0.0035,-0.0011 0,-1.18e-4 c 0.931715,-0.347145 1.628612,-0.742009 2.090345,-1.183765 0.08888,-0.08493 0.169635,-0.172332 0.241439,-0.261628 l 2.33e-4,0 c 0.291981,-0.362264 0.438146,-0.754057 0.438262,-1.17467 l -1.16e-4,0 0,-9.45e-4 c 0,-0.223477 -0.04857,-0.455103 -0.1457,-0.694762 -0.09772,-0.241431 -0.245041,-0.491838 -0.441284,-0.751222 l -3.48e-4,-3.54e-4 -0.489502,-0.659091 c -0.663551,-0.874772 -1.165601,-1.608867 -1.507195,-2.198151 -0.06704,-0.115518 -0.127691,-0.225012 -0.181486,-0.327891 -0.05449,-0.103943 -0.103059,-0.20257 -0.145352,-0.295646 l -5.81e-4,-0.0013 -2.32e-4,-3.54e-4 c -0.14907,-0.334624 -0.261424,-0.695352 -0.336366,-1.082657 -0.07483,-0.38695 -0.112586,-0.801067 -0.112586,-1.242941 l 0,-0.945996 c 0,-0.5674326 -0.07041,-1.1883717 -0.212509,-1.8570299 -0.02777,-0.1305189 -0.05821,-0.2630458 -0.09144,-0.3966357 -0.033,-0.1333536 -0.06913,-0.2695421 -0.107823,-0.4073842 l 0,-3.544e-4 -0.0012,-0.00437 -1.16e-4,0 C 42.790959,6.8172164 42.567878,6.2204912 42.31784,5.7378667 42.269622,5.6447908 42.22001,5.5552584 42.169003,5.4695057 42.11788,5.3833987 42.066293,5.3024888 42.014356,5.2271304 l -5.8e-4,-7.087e-4 -8.14e-4,-0.00118 C 41.5381,4.5287067 40.959134,3.9835985 40.277224,3.5888527 39.594734,3.1938707 38.808139,2.9488968 37.918252,2.8531042 l -0.03555,-0.00378 0,-0.036262 c 0,-0.7262992 -0.330788,-1.0895078 -0.992364,-1.0895078 -0.334739,0 -0.584428,0.090005 -0.748951,0.2695421 z"
+ class="fil2"
+ id="_177368544"
+ style="fill:#ffd42a;fill-rule:nonzero;stroke:#ffffff"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <path
+ d="m 29.765199,15.81227 c 1.988796,-0.89308 4.354856,-1.341687 7.101781,-1.341687 2.739373,0 5.101482,0.448607 7.08656,1.341687 -0.807741,-1.214711 -1.344996,-2.141572 -1.604096,-2.772197 -0.262818,-0.634877 -0.392368,-1.320426 -0.392368,-2.065269 L 41.9228,9.8320253 c 0,-1.6125282 -0.320099,-3.0261481 -0.960181,-4.2407414 -0.796238,-1.5279567 -2.164008,-2.293943 -4.095639,-2.293943 -1.935466,0 -3.30707,0.7659863 -4.110861,2.293943 -0.632413,1.2145933 -0.948678,2.6282132 -0.948678,4.2407414 l -0.03428,1.1427787 c 0,0.744843 -0.12955,1.426258 -0.38865,2.052631 -0.262934,0.62212 -0.800073,1.553233 -1.619317,2.784835 z"
+ class="fil3 str0"
+ id="_178447568"
+ style="fill:#00ffff;stroke:#1f1a17;stroke-width:0.08926718000000000"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="2.5232899"
+ rx="7.4754901"
+ cy="25.5229"
+ cx="106.818"
+ class="fil3 str0"
+ id="_178446656"
+ sodipodi:cx="106.818"
+ sodipodi:cy="25.5229"
+ sodipodi:rx="7.4754901"
+ sodipodi:ry="2.5232899"
+ style="fill:#00ffff;stroke:#1f1a17;stroke-width:0.07620000000000000"
+ d="m 114.29349,25.5229 c 0,1.393574 -3.34689,2.52329 -7.47549,2.52329 -4.1286,0 -7.475489,-1.129716 -7.475489,-2.52329 0,-1.393575 3.346889,-2.52329 7.475489,-2.52329 4.1286,0 7.47549,1.129715 7.47549,2.52329 z"
+ transform="matrix(1.1618836,0,0,1.1811663,-87.404953,-11.883599)"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <ellipse
+ ry="1.5911"
+ rx="1.9198999"
+ transform="matrix(1.0210192,-0.2105488,0.20711156,1.0379641,40.184971,17.887107)"
+ class="fil1 str0"
+ id="_178452704"
+ cx="0"
+ cy="0"
+ sodipodi:cx="0"
+ sodipodi:cy="0"
+ sodipodi:rx="1.9198999"
+ sodipodi:ry="1.5911"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.0762"
+ d="M 1.9198999,0 C 1.9198999,0.87874025 1.0603315,1.5911 0,1.5911 -1.0603315,1.5911 -1.9198999,0.87874025 -1.9198999,0 c 0,-0.87874025 0.8595684,-1.5911 1.9198999,-1.5911 1.0603315,0 1.9198999,0.71235975 1.9198999,1.5911 z"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <rect
+ height="1.9762512"
+ width="1.3709967"
+ transform="matrix(0.97696548,-0.21339738,0.206787,0.97838598,0,0)"
+ class="fil1 str0"
+ id="_178452776"
+ x="34.885159"
+ y="23.03124"
+ style="fill:#1f1a17;stroke:#1f1a17;stroke-width:0.08004317"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ <polygon
+ style="fill:#ff0000"
+ class="fil4"
+ points="124.047,30.0711 121.837,30.0711 130.241,20.4678 121.522,10.5039 123.731,10.5039 131.346,19.2055 138.891,10.5828 141.101,10.5828 132.45,20.4678 140.785,29.9922 138.576,29.9922 131.346,21.73 "
+ id="polygon2952"
+ transform="matrix(1.1618836,0,0,1.1811663,-115.72971,-12.263797)"
+ inkscape:export-filename="/home/bzouk/mmmm/N9Profil26.png"
+ inkscape:export-xdpi="49.39748"
+ inkscape:export-ydpi="49.39748" />
+ </g>
+</svg>
--- /dev/null
+/* XPM */
+static char * N9Profil26_xpm[] = {
+"26 26 279 2",
+" c None",
+". c #FF0000",
+"+ c #D5CCCC",
+"@ c #C48180",
+"# c #D9B6B6",
+"$ c #CDCDC9",
+"% c #7BA09E",
+"& c #A8BDB8",
+"* c #DEDDD9",
+"= c #C59493",
+"- c #E30505",
+"; c #FB0100",
+"> c #B82E2D",
+", c #DAD9D9",
+"' c #FF0404",
+") c #A69894",
+"! c #07CECE",
+"~ c #00FFFF",
+"{ c #01FBFA",
+"] c #239593",
+"^ c #EE5C5B",
+"/ c #D2CFCF",
+"( c #B80B0A",
+"_ c #FE0000",
+": c #9E6C6B",
+"< c #EF5C5A",
+"[ c #DC1616",
+"} c #11EEEE",
+"| c #59A5A5",
+"1 c #F20B0A",
+"2 c #B0ADAC",
+"3 c #DF0403",
+"4 c #831E1D",
+"5 c #DAD8D7",
+"6 c #BAB8B4",
+"7 c #A84343",
+"8 c #BF4040",
+"9 c #05FAFA",
+"0 c #3BC4C4",
+"a c #EF1010",
+"b c #4E5655",
+"c c #DFDDD7",
+"d c #9D7C7A",
+"e c #9B0C0A",
+"f c #D2D0CF",
+"g c #94938C",
+"h c #09E7E6",
+"i c #C33C3C",
+"j c #AD5252",
+"k c #EA1515",
+"l c #55AAAA",
+"m c #108988",
+"n c #D7D5CF",
+"o c #A15958",
+"p c #B50908",
+"q c #CBC9C8",
+"r c #6F8882",
+"s c #27D8D8",
+"t c #FE0101",
+"u c #AE5151",
+"v c #0D9E9D",
+"w c #CFCDC7",
+"x c #D6D3D3",
+"y c #AB1C1A",
+"z c #EC0202",
+"A c #BE9F9F",
+"B c #DEDBD4",
+"C c #248887",
+"D c #07F8F8",
+"E c #AD4A4A",
+"F c #EA1414",
+"G c #04DFDF",
+"H c #99A9A4",
+"I c #AB9594",
+"J c #A50B09",
+"K c #970C0B",
+"L c #960C0B",
+"M c #7E100E",
+"N c #481713",
+"O c #9E0C0A",
+"P c #87201F",
+"Q c #D6D4D4",
+"R c #A0A19D",
+"S c #127C7A",
+"T c #AA2F2F",
+"U c #C22222",
+"V c #139291",
+"W c #4B5D5D",
+"X c #F20303",
+"Y c #466562",
+"Z c #225A57",
+"` c #DBD9D5",
+" . c #A20D0C",
+".. c #A20B0A",
+"+. c #211916",
+"@. c #850E0D",
+"#. c #CC0605",
+"$. c #836462",
+"%. c #CFCEC9",
+"&. c #0FA1A0",
+"*. c #807F7F",
+"=. c #D72828",
+"-. c #10EFEF",
+";. c #0CA8A7",
+">. c #701210",
+",. c #EB0B0A",
+"'. c #26B9B8",
+"). c #567774",
+"!. c #C6BEBE",
+"~. c #B60C0A",
+"{. c #C00707",
+"]. c #5A1311",
+"^. c #BC0807",
+"/. c #DD0404",
+"(. c #7A5050",
+"_. c #CECDC8",
+":. c #676E6D",
+"<. c #22DDDD",
+"[. c #08CBCB",
+"}. c #165E5C",
+"|. c #865D5C",
+"1. c #D82323",
+"2. c #677875",
+"3. c #CFCBCB",
+"4. c #A86C6C",
+"5. c #973736",
+"6. c #9B2321",
+"7. c #A81614",
+"8. c #A01E1D",
+"9. c #9A3433",
+"0. c #9C5351",
+"a. c #BAA9A8",
+"b. c #D8D6D6",
+"c. c #FD0A09",
+"d. c #A68482",
+"e. c #4C9995",
+"f. c #2E9997",
+"g. c #1EA5A4",
+"h. c #289E9D",
+"i. c #439B98",
+"j. c #689E9A",
+"k. c #EA3C3A",
+"l. c #FB2120",
+"m. c #DEDCDC",
+"n. c #EAE7E6",
+"o. c #E9E9E8",
+"p. c #DBD6D3",
+"q. c #B29F60",
+"r. c #A58617",
+"s. c #B2983A",
+"t. c #C7C1AB",
+"u. c #D4D3D3",
+"v. c #5BAD58",
+"w. c #18A515",
+"x. c #2FA92C",
+"y. c #9FC09E",
+"z. c #DFDBD8",
+"A. c #8C7831",
+"B. c #FECB00",
+"C. c #FFCC00",
+"D. c #C29B08",
+"E. c #C5C3BF",
+"F. c #D8D8D7",
+"G. c #32872F",
+"H. c #00FE00",
+"I. c #00FF00",
+"J. c #07CE05",
+"K. c #B2B7AF",
+"L. c #C8C5C3",
+"M. c #AF8C08",
+"N. c #6F6342",
+"O. c #C3C1C1",
+"P. c #0CA609",
+"Q. c #3C6A36",
+"R. c #9C9691",
+"S. c #E3B503",
+"T. c #725D14",
+"U. c #DBD7D5",
+"V. c #A19F9E",
+"W. c #05D605",
+"X. c #14740F",
+"Y. c #D6D5D4",
+"Z. c #847C6B",
+"`. c #8A6F0C",
+" + c #D4D2D0",
+".+ c #7C8578",
+"++ c #01FA01",
+"@+ c #0F8E0B",
+"#+ c #CDCCCB",
+"$+ c #817241",
+"%+ c #AC8B09",
+"&+ c #CCC9C7",
+"*+ c #4C7F48",
+"=+ c #0AB408",
+"-+ c #C4C3C2",
+";+ c #D3D0CE",
+">+ c #B69209",
+",+ c #D2A805",
+"'+ c #AC8A09",
+")+ c #856B0D",
+"!+ c #93760B",
+"~+ c #9B7D0A",
+"{+ c #E8BA03",
+"]+ c #97885E",
+"^+ c #D1D0CF",
+"/+ c #0EAA0A",
+"(+ c #07C806",
+"_+ c #0D9D09",
+":+ c #137B0D",
+"<+ c #11800D",
+"[+ c #10850D",
+"}+ c #04E003",
+"|+ c #4C8448",
+"1+ c #DDD9D7",
+"2+ c #71633A",
+"3+ c #9C7D0A",
+"4+ c #B59108",
+"5+ c #D2A804",
+"6+ c #F7C601",
+"7+ c #AD8C09",
+"8+ c #372D14",
+"9+ c #846A0E",
+"0+ c #685511",
+"a+ c #C5C2C0",
+"b+ c #D7D6D6",
+"c+ c #406D3B",
+"d+ c #0E9D0A",
+"e+ c #09BA07",
+"f+ c #05DE03",
+"g+ c #08BF08",
+"h+ c #1C3214",
+"i+ c #11810D",
+"j+ c #146D0F",
+"k+ c #B4B6B2",
+"l+ c #BCB9B2",
+"m+ c #E1B403",
+"n+ c #8E730C",
+"o+ c #1F1A17",
+"p+ c #7E640D",
+"q+ c #6E6031",
+"r+ c #C3C5C0",
+"s+ c #05D804",
+"t+ c #0E950B",
+"u+ c #12770E",
+"v+ c #2F6929",
+"w+ c #DCDCDB",
+"x+ c #D0CFCE",
+"y+ c #928144",
+"z+ c #B79309",
+"A+ c #D6AC04",
+"B+ c #FBC900",
+"C+ c #F0C002",
+"D+ c #A28109",
+"E+ c #BA9607",
+"F+ c #8F761D",
+"G+ c #C2BDB7",
+"H+ c #609F5D",
+"I+ c #10AA0D",
+"J+ c #07C706",
+"K+ c #01F101",
+"L+ c #01F301",
+"M+ c #0BB007",
+"N+ c #298F24",
+"O+ c #BFC3BD",
+"P+ c #DFDAD6",
+"Q+ c #D2CECB",
+"R+ c #B5B09F",
+"S+ c #B2A681",
+"T+ c #B0A993",
+"U+ c #C7C3C1",
+"V+ c #E2DCD8",
+"W+ c #E2E1E1",
+"X+ c #D7D6D5",
+"Y+ c #B1B7AF",
+"Z+ c #8BAD88",
+"`+ c #A1B09E",
+" @ c #CCCBCA",
+".@ c #DDDCDC",
+"+@ c #E0DFDF",
+" . . . ",
+" + @ # . $ % & * . . ",
+" = - . ; > , ' ) ! ~ { ] ^ . ",
+" / ( . . . _ : < [ } ~ ~ | 1 ",
+" 2 3 . . . . 4 5 6 7 8 9 0 a b c ",
+" d _ . . . . e f g h i j k l m n ",
+" o . . . . . p q r ~ s t u ~ v w ",
+" x y . . _ . . z A B C D i E F l G H ",
+" I J e K L M N O P Q R S T U V W X Y Z ` ",
+"q ._ . . . ..+.@.#.$. %.&.*.=.-.~ ;.>.,.'.). ",
+"!.~.. . . . {.].^./.(. _.:.k <.~ ~ [.}.|.1.2. ",
+" 3.4.5.6.7.8.9.0.a.b. c.d.e.f.g.h.i.j.k.l. ",
+" m. . . ",
+" ",
+" n. o. ",
+" p.q.r.s.t. u.v.w.x.y. ",
+" z.A.B.C.C.D.E. F.G.H.I.I.J.K. ",
+" L.M.C.C.C.C.N. O.P.I.I.I.I.Q. ",
+" R.S.C.C.C.C.T.U. V.W.I.I.I.I.X.Y. ",
+" Z.C.C.C.C.C.`. + .+++I.I.I.I.@+#+ ",
+" $+C.C.C.C.C.%+&+ *+I.I.I.I.I.=+-+ ",
+" ;+>+,+'+)+!+~+{+]+ ^+/+(+_+:+<+[+}+|+ ",
+"1+2+3+4+5+6+7+8+9+0+a+ b+c+d+e+f+H.g+h+i+j+k+ ",
+"l+m+C.C.C.C.n+o+p+C.q+ r+s+I.I.I.I.t+o+u+I.v+w+",
+"x+y+z+A+B+C.C+D+E+F+G+ H+I+J+K+I.L+_+M+N+O+ ",
+" P+Q+R+S+T+U+U.V+ W+X+Y+Z+`+ @.@+@ "};
--- /dev/null
+# Service description file
+[D-BUS Service]
+Name=org.indt.N9Profil
+Exec=/usr/bin/N9Profil
\ No newline at end of file
--- /dev/null
+#include "event.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtCore/QSettings>
+#include <QtCore/QTimer>
+
+/** Constructor.
+ Set pointers to NULL and create timer
+*/
+Event::Event(QObject *parent) :
+ QObject(parent)
+{
+ is_now = false;
+ is_old= false;
+ timer = new QTimer(this);
+ timer->setSingleShot(true);//A single-shot timer fires only once
+ connect(timer,SIGNAL(timeout()),this,SLOT(TimerTimeout()));
+}
+
+/** GetSummary()
+Returns the summary of event
+\returns summary text
+*/
+QString Event::GetSummary()
+{
+ return summary;
+}
+
+/** GetId()
+Returns id of event
+\returns id
+*/
+QString Event::GetId()
+{
+ return Id_event;
+}
+
+/** isNow()
+Returns if profile is now
+\returns bool is event now
+*/
+bool Event::isNow()
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Is profil now? " << is_now;
+ return is_now;
+}
+
+/** isOld()
+Returns if profile is old
+\returns bool is event old
+*/
+bool Event::isOld()
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Is profil old? " << is_old;
+ return is_old;
+}
+
+/** SetTime
+ Set time and data of event
+ \param I id of event
+ \param des desctription
+ \param sum summary
+ \param SDate start date
+ \param EDate end date
+ */
+void Event::SetTime(QString I, QString des ,QString sum, QDateTime SDate,QDateTime EDate)
+{
+ Id_event = I;
+ description = des;
+ summary = sum;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Setting date time events name" << sum ;
+ start_Date = SDate;
+ end_Date = EDate;
+ timerSet();
+}
+
+/** timerSet
+ Check event start end end
+ */
+void Event::timerSet()
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "timer will be now set for event " << description ;
+
+ if(start_Date > QDateTime::currentDateTime()){ //id start date in future
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "date in future" ;
+ timer->start(QDateTime::currentDateTime().secsTo(start_Date) * 1000 ); // wait to event start
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "sec to event start" << QDateTime::currentDateTime().secsTo(start_Date) ;
+ } else if(( end_Date <= QDateTime::currentDateTime()) ) { //is end date in past
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "event is old" ;
+ is_old = true;
+ } else if((start_Date <= QDateTime::currentDateTime()) && ( end_Date >= QDateTime::currentDateTime()) ) { //is now ?
+ is_now = true;
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "event is now" ;
+ timer->start(QDateTime::currentDateTime().secsTo(end_Date) * 1000);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "sec to event end" << QDateTime::currentDateTime().secsTo(end_Date) ;
+ emit s_event_change(this); //emit signal
+ }
+}
+
+/** TimerTimeout
+ slot for timer
+ */
+void Event::TimerTimeout()
+{
+ if((is_now == false) && (is_old == false )){//not not and not old
+ is_now = true;
+ timer->start(start_Date.secsTo(end_Date) * 1000);//timer to end of event
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "sec to event end" << start_Date.secsTo(end_Date) ;
+ emit s_event_change(this); //emit signal
+ } else if((is_now == true) && (is_old == false)) {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " end of event " ;
+ is_now = false;
+ is_old = true;
+ emit s_event_change(this);//emit signal
+ }
+}
--- /dev/null
+/** \file event.h
+ \brief contain class for event
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#ifndef EVENT_H
+#define EVENT_H
+
+#include <QObject>
+#include <QtCore/QDateTime>
+class QTimer;
+
+/** \class Event
+ \brief class for store event in calendars
+ class store events from calendar
+ */
+class Event : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Event(QObject *parent = 0);
+ void SetTime(QString I, QString des , QString sum, QDateTime SDate,QDateTime EDate);
+ QString GetSummary();
+ bool isNow();
+ bool isOld();
+ QString GetId();
+
+signals:
+ void s_event_change(Event *);
+public slots:
+
+private:
+ QTimer *timer;
+ QString Id_event;
+ QString summary; // title
+ QString description;
+ QDateTime start_Date;
+ QDateTime end_Date;
+
+ void timerSet();
+
+ bool is_now;
+ bool is_old;
+
+private slots:
+ void TimerTimeout();
+};
+
+#endif // EVENT_H
--- /dev/null
+/** \file main.cpp
+ \brief main + loading translations
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ */
+#include <QtGui/QApplication>
+#include <QtCore/QTextCodec>
+#include <QtCore/QLocale>
+#include <QtCore/QTranslator>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusError>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+
+
+ QApplication a(argc, argv);
+ Q_INIT_RESOURCE(rcc);
+ //names for app and setting class
+ a.setOrganizationName("N9Profil");
+ a.setApplicationName("N9Profil");
+ a.setApplicationVersion("0.1");
+
+ //Text in UTF-8
+ QTextCodec* utf = QTextCodec::codecForName("UTF-8");
+ QTextCodec::setCodecForCStrings(utf);
+ QTextCodec::setCodecForTr(utf);
+
+ QTranslator t;
+
+ /*! http://www.abclinuxu.cz/clanky/programovani/graficke-programy-v-qt-4-7-lokalizace-a-data-programu
+ Sets the application name and the text codec to UTF-8 and
+ reads the translation according to the currently set language:
+ program name + _ + language of the country
+ where language is a two-language code (ISO 639) in lowercase
+ and the country is a two-country code (ISO 3166) in capitals,
+ eg cs_CZ lupdate N9Profil.pro for updating translation
+ */
+ t.load(":/translations/" + a.applicationName() + "_" + QLocale::system().name() ); //QLocale::system() vrati info o jaz. systemu
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "bude se nahravat" << (":/translations/" + a.applicationName() + "_" + QLocale::system().name()) ;
+ // install language
+ a.installTranslator(&t);
+
+
+ MainWindow w;
+
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ qWarning("Cannot connect to the D-Bus session bus.");
+ exit(1);
+ }
+
+ if (!QDBusConnection::sessionBus().registerService("org.indt.N9Profil")) {
+ qWarning("%s", qPrintable(QDBusConnection::sessionBus().lastError().
+ message()));
+ exit(2);
+ }
+
+ if (!QDBusConnection::sessionBus().registerObject("/org/indt/N9Profil", &w,
+ QDBusConnection::ExportAllContents)) {
+ qWarning("%s", qPrintable(QDBusConnection::sessionBus().lastError().
+ message()));
+ exit(3);
+ }
+
+
+ w.Init();//init
+
+ w.show();
+
+ return a.exec();
+}
+
+/** \mainpage N9Profile for N900
+ N9Profile can create profiles for N900 and set them via libprofile
+
+ \section instal_section Instalation
+You can use scratchbox and compile source or use .deb packege <br>
+You will need: <br>
+\> scratchbox
+\> libprofile
+\> calendar-backend
+\> QT4.6.2 for maemo( in /opt/qt..)
+
+*/
+
--- /dev/null
+
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include "profildialog.h"
+#include "controlclass.h"
+#include "profil.h"
+#include "profiledb.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QMessageBox>
+#include <QtGui/QListWidgetItem>
+#include <QtGui/QCloseEvent>
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+#include <QtCore/QStringList>
+#include <QtGui/QStandardItemModel>
+#include "timedprofildialog.h"
+#include <QtDBus/QDBusInterface>
+const char name[] = "N9Profile";
+/** Constructor.
+Setup ui and create new object for item model and maemo5
+value button
+*/
+MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) :
+ QMainWindow(parent, flags),
+ ui(new Ui::MainWindow),
+ p_cnt_class(new ControlClass(this)),
+ p_set_Profile_button(NULL),
+ p_list_pick_profile(NULL),
+ p_model_profile_names(NULL),
+ p_Timed_Profile_button(NULL),
+ p_Calendar_Profile_button(NULL),
+ connectionInterface(new QDBusInterface("org.freedesktop.Notifications",
+ "/org/freedesktop/Notifications",
+ "org.freedesktop.Notifications",
+ QDBusConnection::systemBus(),this))
+{
+ ui->setupUi(this);
+ createMermoButtons();
+}
+
+
+void MainWindow::sendNotif(QString name_of_profile)
+{
+ if(isHidden()) {
+ qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "profil pro zlutou";
+ if (!connectionInterface->isValid()) {
+ qWarning() << "Cannotct conect to D-BUS";
+ } else {
+ //send message
+ qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "zobrazi ho ?";
+ connectionInterface->call(QLatin1String("SystemNoteInfoprint"),QVariant(name_of_profile));
+ }
+ }
+ ui->statusBar->showMessage(name_of_profile);
+}
+
+/** createMermoButtons()
+Create maemo 5 buttons and model
+*/
+void MainWindow::createMermoButtons()
+{
+ p_model_profile_names = new QStandardItemModel(this);//model for maemo 5 button
+
+ p_set_Profile_button = new QMaemo5ValueButton(tr("Default profile"), this);
+ p_set_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ p_list_pick_profile = new QMaemo5ListPickSelector();
+ p_list_pick_profile->setModel(p_model_profile_names);
+ p_set_Profile_button->setPickSelector(p_list_pick_profile);
+ ui->verticalLayout_2->addWidget(p_set_Profile_button);
+
+ //connect signal when user select profil to slot
+ connect(p_list_pick_profile,SIGNAL(selected(QString)),this,SLOT(SetDeafaultProfile(QString)));
+
+ p_Timed_Profile_button = new QMaemo5ValueButton(tr("Timed profile"), this);
+ p_Timed_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ //when user click on Timed profile button
+ connect(p_Timed_Profile_button,SIGNAL(clicked()),this,SLOT(SetTimedProfile()));
+
+
+ p_Calendar_Profile_button = new QMaemo5ValueButton(tr("Calendar profiles"), this);
+ p_Calendar_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ connect(p_Calendar_Profile_button,SIGNAL(clicked()),this, SLOT(SetCalendarProfiles()));
+ ui->verticalLayout_2->addWidget(p_Calendar_Profile_button);
+
+
+ p_IDWifi_Profile_button = new QMaemo5ValueButton(tr("Network profile"), this);
+ p_IDWifi_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ connect(p_IDWifi_Profile_button,SIGNAL(clicked()),this, SLOT(SetNetworkProfile()));
+ ui->verticalLayout_2->addWidget(p_IDWifi_Profile_button);
+
+ ui->verticalLayout_2->addWidget(p_Timed_Profile_button);
+}
+
+/** Destructor.
+Delete the UI and the control class
+*/
+MainWindow::~MainWindow()
+{
+ delete ui;
+ delete p_cnt_class;
+}
+
+/** Init.
+Used to create and initialize the control class.
+*/
+void MainWindow::Init()
+{
+
+ //connec signal when user sets timed profile or when timed profile ends
+ connect(this,SIGNAL(s_hide_show()),p_cnt_class,SLOT(ShowHide()));
+ connect(p_cnt_class,SIGNAL(s_timed_profile_name(QString)),this,SLOT(SetTimedProfilename(QString)));
+ connect(p_cnt_class,SIGNAL(s_calendar_profile_name(QString)),this,SLOT(SetCalendarProfilename(QString)));
+ connect(p_cnt_class,SIGNAL(s_network_profile_name(QString)),this,SLOT(SetMetworkProfilename(QString)));
+ connect(p_cnt_class,SIGNAL(s_profile_now(QString)),this,SLOT(sendNotif(QString)));
+
+ connect(this,SIGNAL(s_aboutToEnd()),p_cnt_class->GetProfileDB(),SLOT(SaveProfilesToXml())); //save xml berofe end
+ //signal when profiles are changed (add profile, delete profile)
+ connect(p_cnt_class->GetProfileDB()->GetProfileManager(),SIGNAL(s_profiles_name_change(QStringList)),this,SLOT(changeInProfiles(QStringList)));
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "init controll class";
+ p_cnt_class->Init(&settings);
+
+ // changeInProfiles(p_cnt_class->GetProfileDB()->GetProfilesNames());//get profiles names and sets them
+}
+
+/** changeInProfiles();.
+Slot for signal when new profile is created or deleted
+\param Profiles_Names list of profile names
+*/
+void MainWindow::changeInProfiles(QStringList Profiles_Names)
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "set profile names to listwidgetview ";
+ ui->listWidgetProfiles->clear();//clear view
+ ui->listWidgetProfiles->addItems(Profiles_Names);//set names
+
+ p_model_profile_names->clear();//clear model for maemo buttons
+
+ for (int i = 0; i < Profiles_Names.size(); ++i){ //add
+ p_model_profile_names->appendRow(new QStandardItem(Profiles_Names.at(i)));
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "pridavam ted: " << Profiles_Names.at(i);
+ }
+ setNewIndexDeafaultProfile();
+}
+
+
+/** setNewIndexDeafaultProfile();.
+Method for setting index in list pick
+*/
+void MainWindow::setNewIndexDeafaultProfile()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "select index";
+ QList<QStandardItem *> list_of_items;
+ //get defult name,MatchExactly and find in model
+ list_of_items = p_model_profile_names->findItems(p_cnt_class->GetDefaultProfile(), Qt::MatchExactly, 0);//find in 1.
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "size of list is: " << list_of_items.count();
+ if(!list_of_items.empty()){
+ //set list pick index
+ p_list_pick_profile->setCurrentIndex(list_of_items.at(0)->row());
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "item in list pick selected:" ;
+ }
+}
+
+/** on_listWidgetProfiles_itemClicked
+Slot for signal when user click on item in QListWidget
+and show dialog to update profile
+\param item item in list widget
+*/
+void MainWindow::on_listWidgetProfiles_itemClicked(QListWidgetItem* item)
+{
+ Profil * profil;
+ ProfileDB* db = p_cnt_class->GetProfileDB();// get profile DB;
+ QMessageBox msgBox;
+ msgBox.setIcon(QMessageBox::Information);
+ msgBox.setText(tr("Delete or modify profile?"));
+ msgBox.setEscapeButton(QMessageBox::Cancel);
+ QPushButton *CancelButton = msgBox.addButton(QMessageBox::Cancel);
+ QPushButton *DeleteButton = msgBox.addButton(tr("Delete"), QMessageBox::ActionRole);
+ QPushButton *modifyButton = msgBox.addButton(tr("Modify"),QMessageBox::DestructiveRole);
+
+
+ msgBox.exec();
+ if (msgBox.clickedButton() == DeleteButton) {
+ if(item->text() == p_list_pick_profile->currentValueText()){
+ QMaemo5InformationBox::information(this, tr("You cannot delete deafult profile"), QMaemo5InformationBox::DefaultTimeout);
+ }else {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "bude se namaaz";
+ db->GetProfileManager()->DeleteProfile(item->text());
+ }
+ } else if (msgBox.clickedButton() == modifyButton) {
+ profil = new Profil(item->text()); //create profil and sets name
+
+ if(!db->GetProfileManager()->GetProfile(profil))//
+ {
+ return;
+ }
+
+ ProfilDialog dialog(db->GetProfileManager()->GetProfilesNames(),this, profil,db->GetSoundFilesManager()->GetModel()); //
+
+ int result = dialog.exec();
+
+ if(result)
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "OK update profile";
+
+ db->GetProfileManager()->UpdateProfile(profil);
+ }
+ delete profil;
+ }else if (msgBox.clickedButton() == CancelButton) {
+ return;
+ }
+}
+
+/** on_ButtonNewProfile_clicked();.
+Serves as a slot for the button to create a new profile.
+Creates a new profile and forward links.
+*/
+void MainWindow::on_ButtonNewProfile_clicked()
+{
+ ProfileDB* db = p_cnt_class->GetProfileDB();
+ Profil * profil = new Profil("");//new profiel
+ ProfilDialog dialog(db->GetProfileManager()->GetProfilesNames(),this, profil,db->GetSoundFilesManager()->GetModel()); //dostane profil, jmena profilu a model
+
+ int result = dialog.exec();
+
+ if(result)
+ {
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "save profile";
+ db->GetProfileManager()->CreateProfile(profil);
+ }
+ delete profil;
+}
+
+/** SetTimedProfile
+Slot for signal when user click on button for timed profile
+*/
+void MainWindow::SetTimedProfile()
+{
+ p_cnt_class->SetTimeProfile();
+}
+
+/** SetTimedProfilename
+Slot for signal when set profile
+\param profile_name name of profile
+*/
+void MainWindow::SetTimedProfilename(QString profile_name)
+{
+ p_Timed_Profile_button->setValueText(profile_name);
+}
+
+/** SetCalendarProfiles
+Slot for signal when user click on button for calendar profile
+*/
+void MainWindow::SetCalendarProfiles()
+{
+ p_cnt_class->SetCalendar();
+}
+
+/** SetNetworkProfile
+Slot for signal when user click on button for network profile
+*/
+void MainWindow::SetNetworkProfile()
+{
+ p_cnt_class->SetNetwork();
+ //=======================================
+}
+
+/** SetCalendarProfilename
+Slot for signal when calendar object select profile
+\param profile_name name of profile
+*/
+void MainWindow::SetCalendarProfilename(QString profile_name)
+{
+ p_Calendar_Profile_button->setValueText(profile_name);
+}
+
+/** SetDeafaultProfile(QString profile_name)
+Slot for signal when user choose profile name from QMaemoButton
+\param profile_name name of profile
+*/
+void MainWindow::SetDeafaultProfile(QString profile_name)
+{
+ p_cnt_class->SetDefaultProfile(profile_name);
+}
+
+/** SetMetworkProfilename(QString profile_name)
+Slot for signal when network object select profile
+\param profile_name name of profile
+*/
+void MainWindow::SetMetworkProfilename(QString profile_name )
+{
+ p_IDWifi_Profile_button->setValueText(profile_name);
+}
+
+//======================================================================================
+/** closeEvent(QCloseEvent *event)
+Slot for close event.
+It will call method maybeQuit()
+*/
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ hide();
+ event->ignore();
+ emit s_hide_show();
+}
+
+void MainWindow::on_actionExit_triggered()
+{
+ if (maybeQuit()) {
+ emit s_aboutToEnd();
+ QCoreApplication::quit();
+ } else {
+ return;
+ }
+}
+
+/** maybeQuit()
+Method for show QMessageBox before
+It will ask user if he want to quit.
+*/
+bool MainWindow::maybeQuit()
+{
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("Application"),
+ tr("Program will end.\n"
+ "Do you want to quit?"),
+ QMessageBox::Ok | QMessageBox::Cancel);
+ switch (ret) {
+ case QMessageBox::Ok:
+ return true;
+ break;
+ case QMessageBox::Cancel:
+ return false;
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+int MainWindow::top_application()
+{
+ show();
+ return 0;
+}
+
+
+//================================================================================
+/** \brief changeEvent
+ *
+ *
+ *
+ */
+void MainWindow::changeEvent(QEvent *e)
+{
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/** \brief on_actionAboutQT_triggered
+ *
+ *
+ *
+ */
+void MainWindow::on_actionAboutQT_triggered()
+{
+ QMessageBox::aboutQt(this);
+}
+
+/** \brief on_actionAbout_triggered
+ *
+ *
+ *
+ */
+void MainWindow::on_actionAbout_triggered()
+{
+ QString str = QString("");
+ str.append(tr("This program can create mobile profiles and set them. "));
+ str.append(tr("Program will change only general profil in N900. "));
+ str.append(tr("When you first start N9Profil it will create two profile from N900, general a silent. "));
+ str.append(tr("You can set default profile, timed profile for "));
+ str.append(tr("period of time or you can set profiles based on desctriptions "));
+ str.append(tr("in events in calendar. "));
+ str.append(tr("Timed profile have bigger priority, then calendar and calendar then default profile. "));
+ QMessageBox::about(this,tr("About N9Profil"), str);
+}
+
+void MainWindow::on_pushButtonPhonenum_clicked()
+{
+ p_cnt_class->SetTelNum();
+}
--- /dev/null
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+/*! \file mainwindow.h
+ \brief File .h for class MainWindow
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ Header file
+*/
+#include <QMainWindow>
+#include <QtCore/QSettings>
+//#include <QtGui/QSystemTrayIcon>
+
+namespace Ui {
+ class MainWindow;
+}
+class ControlClass;
+class QListWidgetItem;
+class QMaemo5ListPickSelector;
+class QMaemo5ValueButton;
+class QStandardItemModel;
+class QDBusInterface;
+/*!
+ \class MainWindow
+ \brief Class to display the main window
+*/
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.indt.N9Profil")
+
+public:
+ MainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ ~MainWindow();
+
+ void Init();
+
+public slots:
+ void changeInProfiles(QStringList Profiles_Names);
+ Q_SCRIPTABLE int top_application();
+
+signals:
+ void s_aboutToEnd();
+ void s_hide_show();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ void createMermoButtons();
+ void closeEvent(QCloseEvent *event);
+
+ //! QT Class for storing settings.
+ /*!
+ * Class will save the program settings.
+ */
+ QSettings settings;
+ QDBusInterface *connectionInterface;
+
+ Ui::MainWindow *ui;
+ ControlClass *p_cnt_class;
+
+ QMaemo5ValueButton *p_set_Profile_button;
+ QMaemo5ListPickSelector *p_list_pick_profile;
+ QStandardItemModel *p_model_profile_names;
+ void setNewIndexDeafaultProfile();
+
+ QMaemo5ValueButton *p_Timed_Profile_button;
+ QMaemo5ValueButton *p_Calendar_Profile_button;
+ QMaemo5ValueButton *p_IDWifi_Profile_button;
+ bool maybeQuit();
+
+private slots:
+ void on_pushButtonPhonenum_clicked();
+ void on_actionExit_triggered();
+ void on_actionAbout_triggered();
+ void on_actionAboutQT_triggered();
+ void SetTimedProfile();
+ void SetCalendarProfiles();
+ void SetNetworkProfile();
+ void on_listWidgetProfiles_itemClicked(QListWidgetItem* item);
+ void on_ButtonNewProfile_clicked();
+ void SetDeafaultProfile(QString);
+ void SetTimedProfilename(QString);
+ void SetCalendarProfilename(QString);
+ void SetMetworkProfilename(QString);
+
+ void sendNotif(QString name_of_profile);
+
+
+};
+
+#endif // MAINWINDOW_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>N9Profile</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <widget class="QListWidget" name="listWidgetProfiles">
+ <property name="geometry">
+ <rect>
+ <x>410</x>
+ <y>30</y>
+ <width>381</width>
+ <height>321</height>
+ </rect>
+ </property>
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="showDropIndicator" stdset="0">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QWidget" name="verticalLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>401</width>
+ <height>341</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QPushButton" name="ButtonNewProfile">
+ <property name="text">
+ <string>New profile</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonPhonenum">
+ <property name="text">
+ <string>Phone number rules</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>550</x>
+ <y>-5</y>
+ <width>121</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Profiles</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuMenu">
+ <property name="title">
+ <string>Menu</string>
+ </property>
+ <addaction name="actionAbout"/>
+ <addaction name="actionAboutQT"/>
+ <addaction name="actionExit"/>
+ </widget>
+ <addaction name="menuMenu"/>
+ </widget>
+ <widget class="QToolBar" name="mainToolBar">
+ <attribute name="toolBarArea">
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ <widget class="QStatusBar" name="statusBar"/>
+ <action name="actionAbout">
+ <property name="text">
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQT">
+ <property name="text">
+ <string>AboutQT</string>
+ </property>
+ </action>
+ <action name="actionExit">
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "networkdialogdialog.h"
+#include "ui_networkdialogdialog.h"
+#include <QtCore/QStringList>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QItemSelectionModel>
+#include <QtGui/QStandardItemModel>
+#include <QMaemo5InformationBox>
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+#include <QtGui/QMessageBox>
+#include "networkdialogedit.h"
+
+/** Constructor.
+ Gets pointer to settings and set window title
+*/
+NetWorkdialogDialog::NetWorkdialogDialog(QWidget *parent, QSettings *sett) :
+ QDialog(parent),
+ ui(new Ui::NetWorkdialogDialog)
+{
+ ui->setupUi(this);
+ settings = sett;
+ setWindowTitle(tr("Network profile"));
+}
+
+/** Destructor.
+ Delete ui
+*/
+NetWorkdialogDialog::~NetWorkdialogDialog()
+{
+ delete ui;
+}
+
+void NetWorkdialogDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+
+/** SetViews.
+Set view models, behavior, mode and triggerrs
+\param model_of_profiles model of profiles
+\param selModel_profiles selection model for profiles
+\param model_of_calendars model of calendars
+\param selModel_calendars selection model for calendars
+*/
+void NetWorkdialogDialog::SetViews(QStandardItemModel *model_of_CellId ,
+ QItemSelectionModel *selModel_CellId,
+ QStandardItemModel *model_of_WifiIf ,
+ QItemSelectionModel *selModel_WifiIf)
+{
+ ui->tableViewLocationId->setModel(model_of_CellId);
+
+ ui->tableViewLocationId->setSelectionModel(selModel_CellId);
+ ui->tableViewLocationId->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui->tableViewLocationId->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->tableViewLocationId->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ //ui->tableView_2->resizeColumnsToContents();
+ ui->tableViewLocationId->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ ui->tableView_WIFIID->setModel(model_of_WifiIf);
+ ui->tableView_WIFIID->setSelectionModel(selModel_WifiIf);
+ ui->tableView_WIFIID->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+ ui->tableView_WIFIID->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui->tableView_WIFIID->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->tableView_WIFIID->setEditTriggers(QAbstractItemView::NoEditTriggers);
+}
+
+/** SetProfilenames.
+Set profiles names
+\param list_of_profiles_nf names of profiles
+*/
+void NetWorkdialogDialog::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+
+ ui->buttonGroup->setId(ui->radioButtonIDLoc,0);
+ ui->buttonGroup->setId(ui->radioButtonWifi,1);
+
+ ui->radioButtonIDLoc->setChecked(true);
+
+}
+
+/** SetIDWIFInames.
+Set text for labels
+\param idloc location id
+\param wifiname wifi name
+*/
+void NetWorkdialogDialog::SetIDWIFInames(QString idloc, QString wifiname)
+{
+ if(idloc == "-1")
+ {
+ ui->labelIDloc->setText(tr("Phone not connected"));
+ ui->labelIDLoacName->setText("");
+ } else {
+ ui->labelIDLoacName->setText(idloc);
+ }
+
+ if(wifiname.isEmpty())
+ {
+ ui->labelWifi->setText(tr("Wifi not connected"));
+ ui->labelWifiname->setText(wifiname);
+ } else {
+ ui->labelWifiname->setText(wifiname);
+ }
+}
+
+
+/** createNewRule()
+Create new rule for location or wifi
+*/
+void NetWorkdialogDialog::createNewRule()
+{
+ int id = ui->buttonGroup->checkedId();
+ //check is mobile connected
+ if((ui->labelWifiname->text().isEmpty()) && (id == 1))
+ {
+ QMaemo5InformationBox::information(this, tr("Not connedted to wifi"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if((ui->labelIDLoacName->text().isEmpty())&& (id == 0) )
+ {
+ QMaemo5InformationBox::information(this, tr("Mobile not connected"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if((id == 1) && (FindWifiNameInModel(ui->labelWifiname->text())))
+ {
+ QMaemo5InformationBox::information(this, tr("This rule for wifi exists"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if((id == 0) && (FindIDLocInModel(ui->labelIDLoacName->text())))
+ {
+ QMaemo5InformationBox::information(this, tr("This rule for location exists"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+
+ QStandardItemModel *model;
+ QList<QStandardItem *> listitems;
+
+ NetWorkDialogEdit dialog(this);
+ if(id == 0)//for location
+ {
+ dialog.SetNameOfLabel(ui->labelIDLoacName->text(), QString(tr("New location rule for: ")));
+ model = (QStandardItemModel *) ui->tableViewLocationId->model();//model je ted id loc
+ listitems = model->findItems(ui->labelIDLoacName->text());
+ if(listitems.empty())//nic nanašel
+ {
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ int result = dialog.exec();
+ if(result)
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "Nove providloooooooooo";
+ //nove jmeno pro pravidlo
+ listitems.append(new QStandardItem(dialog.GetNameOfRule()));//jmeno pravidla
+ listitems.append(new QStandardItem(ui->labelIDLoacName->text()));//nova lokace
+ listitems.append(new QStandardItem(dialog.GetNameProfile()));//jmeno profilu
+ model->appendRow(listitems);
+ emit s_change_model();//vyslu zmenu
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ }
+ }
+ else // neco našel a to je špatně
+ {
+ QMaemo5InformationBox::information(this, tr("This rule exist"), QMaemo5InformationBox::DefaultTimeout);
+ }
+
+ } else if(id == 1)//for wifi
+ {
+ dialog.SetNameOfLabel(ui->labelWifiname->text(), QString(tr("New WiFi rule for: ")));
+ model = (QStandardItemModel *) ui->tableView_WIFIID->model(); //model pro wifi
+ listitems = model->findItems(ui->labelWifiname->text());
+ if(listitems.empty())//nic nanašel
+ {
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ int result = dialog.exec();
+ if(result)
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "Nove providloooooooooo";
+ //nove jmeno pro pravidlo
+ listitems.append(new QStandardItem(dialog.GetNameOfRule()));//jmeno pravidla
+ listitems.append(new QStandardItem(ui->labelWifiname->text()));//nove wifi
+ listitems.append(new QStandardItem(dialog.GetNameProfile()));//jmeno profilu
+ model->appendRow(listitems);
+ emit s_change_model();//vyslu zmenu
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ }
+ }
+ else // neco našel a to je špatně
+ {
+ QMaemo5InformationBox::information(this, tr("This rule exist"), QMaemo5InformationBox::DefaultTimeout);
+ }
+ }
+}
+
+/** on_tableViewLocationId_clicked()
+Slot when user click on location
+user can modifi or delete rule
+*/
+void NetWorkdialogDialog::on_tableViewLocationId_clicked(QModelIndex index)
+{
+ Q_UNUSED(index)
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "kliknutu na idloc";
+
+ QItemSelectionModel *selModel = ui->tableViewLocationId->selectionModel();
+ if(!selModel->hasSelection()) return;//no selection retirn
+ QModelIndexList list_of_selected = selModel->selectedIndexes(); //get selected
+ QStandardItemModel *model = (QStandardItemModel *) ui->tableViewLocationId->model(); //model
+ int row = list_of_selected.at(0).row();//get row
+
+ QMessageBox msgBox;
+ msgBox.setIcon(QMessageBox::Information);
+ msgBox.setText(tr("Delete or modify profile?"));
+ msgBox.setEscapeButton(QMessageBox::Cancel);
+ QPushButton *CancelButton = msgBox.addButton(QMessageBox::Cancel);
+ QPushButton *DeleteButton = msgBox.addButton(tr("Delete"), QMessageBox::ActionRole);
+ QPushButton *modifyButton = msgBox.addButton(tr("Modify"),QMessageBox::DestructiveRole);
+
+ msgBox.exec(); //delete or modifi
+ if (msgBox.clickedButton() == DeleteButton) {
+
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "bude se mazat pravidlo";
+ model->removeRow(row);
+ selModel->clearSelection();
+ emit s_change_model(); //vyslu zmenu
+ }else if (msgBox.clickedButton() == modifyButton) {
+ NetWorkDialogEdit dialog(this); //modifi
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ dialog.SetNameOfLabel(list_of_selected.at(1).data().toString(), QString(tr("Change profile for location: ")));
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ dialog.SetNameOfRule(list_of_selected.at(0).data().toString()); //dam tomu jmeno pravidla
+
+ int result = dialog.exec();
+ if(result)
+ {
+ //nove jmeno pro pravidlo
+ model->item(list_of_selected.at(0).row(),list_of_selected.at(0).column())->setData(QVariant(dialog.GetNameOfRule()),Qt::DisplayRole);
+ //new name
+ model->item(list_of_selected.at(2).row(),list_of_selected.at(2).column())->setData(QVariant(dialog.GetNameProfile()),Qt::DisplayRole);
+
+ emit s_change_model(); //vyslu zmenu
+ }
+ selModel->clearSelection();
+ }else if (msgBox.clickedButton() == CancelButton) {
+ selModel->clearSelection();
+ return;
+ }
+}
+
+/** on_tableView_WIFIID_clicked()
+Slot when user click on location
+user can modifi or delete rule
+*/
+void NetWorkdialogDialog::on_tableView_WIFIID_clicked(QModelIndex index)
+{
+ Q_UNUSED(index)
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "jmeno wifi" ;
+ QItemSelectionModel *selModel = ui->tableView_WIFIID->selectionModel();
+ if(!selModel->hasSelection()) return;
+ QModelIndexList list_of_selected = selModel->selectedIndexes();
+ QStandardItemModel *model = (QStandardItemModel *) ui->tableView_WIFIID->model();
+ int row = list_of_selected.at(0).row();//get row
+ //======================================
+ //message box for choose
+ QMessageBox msgBox;
+ msgBox.setIcon(QMessageBox::Information);
+ msgBox.setText(tr("Delete or modify profile?"));
+ msgBox.setEscapeButton(QMessageBox::Cancel);
+ QPushButton *CancelButton = msgBox.addButton(QMessageBox::Cancel);
+ QPushButton *DeleteButton = msgBox.addButton(tr("Delete"), QMessageBox::ActionRole);
+ QPushButton *modifyButton = msgBox.addButton(tr("Modify"),QMessageBox::DestructiveRole);
+
+ msgBox.exec();//======================================
+ if (msgBox.clickedButton() == DeleteButton) {
+
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "bude se mazat pravidlo";
+ model->removeRow(row);
+ selModel->clearSelection();
+ emit s_change_model(); //vyslu zmenu
+ }else if (msgBox.clickedButton() == modifyButton) { //show dialog for modifi
+ NetWorkDialogEdit dialog(this);
+ dialog.SetNameOfLabel(list_of_selected.at(1).data().toString(), QString(tr("Change profile for Wifi: ")));
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ dialog.SetNameOfRule(list_of_selected.at(0).data().toString()); //dam tomu jmeno pravidla
+ int result = dialog.exec();
+
+ if(result)
+ {
+ ////qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "OK update profile";
+ //nove jmeno pro pravidlo
+ model->item(list_of_selected.at(0).row(),list_of_selected.at(0).column())->setData(QVariant(dialog.GetNameOfRule()),Qt::DisplayRole);
+ //new name
+ model->item(list_of_selected.at(2).row(),list_of_selected.at(2).column())->setData(QVariant(dialog.GetNameProfile()),Qt::DisplayRole);
+
+ emit s_change_model(); //vyslu zmenu
+ }
+ selModel->clearSelection();
+ } else if (msgBox.clickedButton() == CancelButton) {
+ selModel->clearSelection();
+ return;
+ }
+}
+
+/** on_pushButtonNewrule_clicked()
+Slot when user click on create new rule button
+*/
+void NetWorkdialogDialog::on_pushButtonNewrule_clicked()
+{
+ createNewRule();
+}
+
+
+/** FindIDLocInModel.
+Find id location and return name of profile
+\param IDCell location id
+*/
+bool NetWorkdialogDialog::FindIDLocInModel(QString IDCell)
+{
+ QList<QStandardItem *> list_of_idcell;
+ QStandardItemModel *model ;
+ model = (QStandardItemModel *) ui->tableViewLocationId->model();//model je ted id loc
+
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_idcell = model->findItems(IDCell, Qt::MatchExactly , 1);
+
+ return !list_of_idcell.empty();
+}
+
+/** FindWifiNameInModel.
+Find profile in table based in wifiname
+\param WifiNam name of wifi
+*/
+bool NetWorkdialogDialog::FindWifiNameInModel(QString WifiNam)
+{
+ QList<QStandardItem *> list_of_wifiname;
+ QStandardItemModel *model;
+ model = (QStandardItemModel *) ui->tableView_WIFIID->model(); //model pro wifi
+
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "pocet radku v modelu wifi " << model_of_WifiIf->rowCount();
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_wifiname = model->findItems(WifiNam, Qt::MatchExactly , 1); //fing wifi name in 1 colum
+ return !list_of_wifiname.empty();
+
+}
+
--- /dev/null
+#ifndef NETWORKDIALOGDIALOG_H
+#define NETWORKDIALOGDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class NetWorkdialogDialog;
+}
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QSettings;
+class QMaemo5ValueButton;
+class QStringList;
+class QModelIndex;
+class QListView;
+class QMaemo5ListPickSelector;
+
+/** \class NetWorkdialogDialog
+ \brief class for dialog rules
+ */
+class NetWorkdialogDialog : public QDialog {
+ Q_OBJECT
+public:
+ NetWorkdialogDialog(QWidget *parent = 0, QSettings *sett = 0);
+ ~NetWorkdialogDialog();
+ void SetViews(QStandardItemModel *model_of_CellId ,
+ QItemSelectionModel *selModel_CellId,
+ QStandardItemModel *model_of_WifiIf ,
+ QItemSelectionModel *selModel_WifiIf);
+
+ void SetProfilenames(QStringList list_of_profiles_nf);
+ void SetIDWIFInames(QString idloc, QString wifiname);
+
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::NetWorkdialogDialog *ui;
+ QSettings * settings;
+ QStringList list_of_profiles;
+
+
+ bool FindWifiNameInModel(QString WifiNam);
+ bool FindIDLocInModel(QString IDCell);
+
+signals:
+ void s_change_model();
+
+private slots:
+ void on_pushButtonNewrule_clicked();
+ void on_tableView_WIFIID_clicked(QModelIndex index);
+ void on_tableViewLocationId_clicked(QModelIndex index);
+ void createNewRule();
+};
+
+#endif // NETWORKDIALOGDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>NetWorkdialogDialog</class>
+ <widget class="QDialog" name="NetWorkdialogDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <widget class="QTableView" name="tableViewLocationId">
+ <property name="geometry">
+ <rect>
+ <x>330</x>
+ <y>10</y>
+ <width>461</width>
+ <height>161</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QTableView" name="tableView_WIFIID">
+ <property name="geometry">
+ <rect>
+ <x>330</x>
+ <y>180</y>
+ <width>461</width>
+ <height>192</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelWifi">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>21</y>
+ <width>301</width>
+ <height>28</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Name of wifi network</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelWifiname">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>311</width>
+ <height>28</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelIDloc">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>110</y>
+ <width>311</width>
+ <height>28</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Id location</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelIDLoacName">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>150</y>
+ <width>301</width>
+ <height>28</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ <widget class="QWidget" name="">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>220</y>
+ <width>311</width>
+ <height>161</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QRadioButton" name="radioButtonIDLoc">
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Id location</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioButtonWifi">
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>WiFi name</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonNewrule">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Create new rule</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+ <buttongroups>
+ <buttongroup name="buttonGroup"/>
+ </buttongroups>
+</ui>
--- /dev/null
+#include "networkdialogedit.h"
+#include "ui_networkdialogedit.h"
+#include <QtCore/QStringList>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QItemSelectionModel>
+#include <QtGui/QStandardItemModel>
+#include <QMaemo5InformationBox>
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+#include <QtGui/QMessageBox>
+
+/** Constructor.
+ set title for dialog
+*/
+NetWorkDialogEdit::NetWorkDialogEdit(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::NetWorkDialogEdit)
+{
+ ui->setupUi(this);
+ setWindowTitle(tr("Set profile forNetwork"));
+ selectedProfile = QString("");
+}
+
+/** Destructor.
+*/
+NetWorkDialogEdit::~NetWorkDialogEdit()
+{
+ delete ui;
+}
+
+void NetWorkDialogEdit::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/** SetProfilenames.
+ Store profile names and create maemo button for show this names
+ \param list_of_profiles_nf list of profile names
+*/
+void NetWorkDialogEdit::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+
+ p_model_profile_names = new QStandardItemModel(this);//model for maemo 5 button
+
+ foreach(QString profile, list_of_profiles )
+ {
+ p_model_profile_names->appendRow(new QStandardItem(profile));
+ }
+
+ p_set_Profile_button = new QMaemo5ValueButton(tr("Choose profile for Network:"), this);
+ p_set_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ p_list_pick_profile = new QMaemo5ListPickSelector();
+ p_list_pick_profile->setModel(p_model_profile_names);
+ p_set_Profile_button->setPickSelector(p_list_pick_profile);
+ ui->verticalLayout->addWidget(p_set_Profile_button);
+ connect(p_list_pick_profile,SIGNAL(selected(QString)),this,SLOT(SelectedName(QString)));
+}
+
+/** SelectedName.
+ Slot for change in list pick
+ \param name name of profile
+*/
+void NetWorkDialogEdit::SelectedName(QString name)
+{
+ selectedProfile = name;
+}
+
+/** SetNameOfLabel.
+Set text for label
+ \param id name of network
+ \param name text for label
+*/
+void NetWorkDialogEdit::SetNameOfLabel(QString id, QString name )
+{
+ ui->label->setText(name + id);
+}
+
+/** GetNameProfile.
+Return name of selected profile
+
+*/
+QString NetWorkDialogEdit::GetNameProfile()
+{
+ return selectedProfile;
+}
+
+/** GetNameOfRule.
+Return nameo of rule
+*/
+QString NetWorkDialogEdit::GetNameOfRule()
+{
+ return ui->lineEditNameOfrule->text();
+}
+
+/** SetNameOfLabel.
+set namo of rule
+ \param name text for label
+*/
+void NetWorkDialogEdit::SetNameOfRule(QString name)
+{
+ ui->lineEditNameOfrule->setText(name);
+}
+
+/** accept()
+Slot for signal when user click on save button.
+Check is everyting is OK
+*/
+void NetWorkDialogEdit::accept()
+{
+ if(selectedProfile.isEmpty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select profile for network"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if(ui->lineEditNameOfrule->text().isEmpty())
+ {
+ QMaemo5InformationBox::information(this, tr("Please fill name"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ done(QDialog::Accepted);
+}
--- /dev/null
+#ifndef NETWORKDIALOGEDIT_H
+#define NETWORKDIALOGEDIT_H
+
+#include <QDialog>
+
+namespace Ui {
+ class NetWorkDialogEdit;
+}
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QSettings;
+class QMaemo5ValueButton;
+class QStringList;
+class QModelIndex;
+class QListView;
+class QMaemo5ListPickSelector;
+
+/** \class NetWorkDialogEdit
+ \brief class for dialog to edit rules
+ */
+class NetWorkDialogEdit : public QDialog {
+ Q_OBJECT
+public:
+ NetWorkDialogEdit(QWidget *parent = 0);
+ ~NetWorkDialogEdit();
+
+ void SetProfilenames(QStringList list_of_profiles_nf);
+ void SetNameOfLabel(QString id, QString name );
+ QString GetNameProfile();
+ QString GetNameOfRule();
+ void SetNameOfRule(QString name);
+
+protected:
+ void changeEvent(QEvent *e);
+ void accept();
+
+private:
+ Ui::NetWorkDialogEdit *ui;
+
+ QMaemo5ValueButton *p_set_Profile_button;
+ QMaemo5ListPickSelector *p_list_pick_profile;
+ QStandardItemModel *p_model_profile_names;
+
+ QString selectedProfile;
+ QStringList list_of_profiles;
+
+ QString name_of_rule;
+
+
+private slots:
+ void SelectedName(QString name);
+};
+
+#endif // NETWORKDIALOGEDIT_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>NetWorkDialogEdit</class>
+ <widget class="QDialog" name="NetWorkDialogEdit">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pushButton">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Name of rule</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEditNameOfrule">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>pushButton</sender>
+ <signal>clicked()</signal>
+ <receiver>NetWorkDialogEdit</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>215</x>
+ <y>152</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>88</x>
+ <y>66</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+#include "networkprofile.h"
+#include <QtCore/QStringList>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QStandardItemModel>
+#include <QtGui/QItemSelectionModel>
+#include <QtCore/QTimer>
+#include "networkdialogdialog.h"
+
+using namespace QtMobility;
+/** Constructor.
+ Get setting pointer and create network class.
+ Connect all signal from networkclass to slot
+ and gets name of network
+*/
+NetWorkProfile::NetWorkProfile(QWidget *parent, QSettings *sett) :
+ QWidget(parent)
+{
+ settings = sett;
+ p_networkcl = new QSystemNetworkInfo(this);
+ timer = new QTimer(this);
+ connect(timer,SIGNAL(timeout()),this,SLOT(ChangeInCellLocation()));
+ timer->start(10000);//each 10 seconds shot
+ connect(p_networkcl,SIGNAL(networkNameChanged(QSystemNetworkInfo::NetworkMode,QString)),this,SLOT(ChangeInWifiName(QSystemNetworkInfo::NetworkMode, QString )));
+ qDebug()<< "ziskam id============================";
+ CellLocation = QString::number(p_networkcl->locationAreaCode());
+ qDebug()<< "==================" << CellLocation;
+ WifiName = p_networkcl->networkName(QSystemNetworkInfo::WlanMode);
+ qDebug()<< "==================" << WifiName;
+ model_of_CellId = NULL;
+ model_of_WifiIf = NULL;
+}
+
+
+/** SetProfilenames.
+Set profiles names
+\param list_of_profiles_nf names of profiles
+*/
+void NetWorkProfile::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+}
+
+/** DeletedProfile.
+Slot for name of deleted profile
+\param list_of_profiles_nf names of profiles
+*/
+void NetWorkProfile::DeletedProfile(QString name)
+{
+ if(name == profile_Currently)
+ SetProfile();
+}
+
+/** createModels
+gets model and create selection models
+*/
+void NetWorkProfile::createModels(QStandardItemModel * cellM, QStandardItemModel * wifiM)
+{
+ if((cellM == NULL) || (wifiM == NULL)){
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "jeden je null" ;
+ }
+ model_of_CellId = cellM;
+ selModel_CellId = new QItemSelectionModel(model_of_CellId);
+ model_of_WifiIf = wifiM;
+ selModel_WifiIf = new QItemSelectionModel(model_of_WifiIf);
+ SetProfile();;//set profile
+}
+
+
+/** ChangeInCellLocation.
+Slot for change in location
+\param list_of_profiles_nf names of profiles
+*/
+void NetWorkProfile::ChangeInCellLocation()
+{
+ CellLocation = QString::number(p_networkcl->locationAreaCode());
+ WifiName = p_networkcl->networkName(QSystemNetworkInfo::WlanMode);
+ qDebug()<< "=====změna v id lov" << CellLocation;
+ SetProfile();
+}
+
+/** ChangeInWifiName.
+Slot for change in wifi name
+\param list_of_profiles_nf names of profiles
+*/
+void NetWorkProfile::ChangeInWifiName(QSystemNetworkInfo::NetworkMode mode, QString name )
+{
+ qDebug()<< "změna ve jménu" << name;
+
+ if(mode == QSystemNetworkInfo::WlanMode)
+ {
+ qDebug()<< "změna ve jménu wifi" << name;
+ WifiName = name;
+ SetProfile();
+ }
+}
+
+/** SetProfile.
+Set profile based of name of wifi or location id
+Find rule in tables and set profile
+*/
+void NetWorkProfile::SetProfile()
+{
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "kontrola zda jsou profily null";
+ if((model_of_CellId == NULL) || (model_of_WifiIf == NULL)) return;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "bude se ted nastavovoat nový profil";
+ profile_Currently = QString("");
+ QString str = QString("");
+
+ if(!WifiName.isEmpty())
+ {
+ // profile_Currently
+ str = FindWifiNameInModel(WifiName);
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nalezlo to profil pro wifi sit? " << str;
+ if(str.isEmpty())
+ {
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "";
+ str = FindIDLocInModel(CellLocation);
+ profile_Currently = str;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil na ic loc " << profile_Currently;
+ emit s_network_profile(profile_Currently);
+ return;
+ } else {
+ profile_Currently = str;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil na wifi name " << profile_Currently;
+ emit s_network_profile(profile_Currently);
+ return;
+ }
+ } else
+ {
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "wifi neni " ;
+ str = FindIDLocInModel(CellLocation);
+ profile_Currently = str;
+ emit s_network_profile(profile_Currently);
+ return;
+ }
+ emit s_network_profile(profile_Currently);
+}
+
+/** FindIDLocInModel.
+Find id location and return name of profile
+\param IDCell location id
+*/
+QString NetWorkProfile::FindIDLocInModel(QString IDCell)
+{
+ QString name = QString("");
+ QList<QStandardItem *> list_of_idcell;
+
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_idcell = model_of_CellId->findItems(IDCell, Qt::MatchExactly , 1);
+
+ if(list_of_idcell.empty())
+ {
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nic nanasel " ;
+ return name;
+ } else
+ {
+ name = model_of_CellId->item(list_of_idcell.at(0)->row(),2)->data(Qt::DisplayRole).toString();
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nasel ho " << name;
+ return name;
+ }
+}
+
+/** FindWifiNameInModel.
+Find profile in table based in wifiname
+\param WifiNam name of wifi
+*/
+QString NetWorkProfile::FindWifiNameInModel(QString WifiNam)
+{
+ QString name = QString("");
+ QList<QStandardItem *> list_of_wifiname;
+
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "pocet radku v modelu wifi " << model_of_WifiIf->rowCount();
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_wifiname = model_of_WifiIf->findItems(WifiNam, Qt::MatchExactly , 1); //fing wifi name in 1 colum
+ if(list_of_wifiname.empty())
+ {
+ return name;
+ } else
+ {
+ name = model_of_WifiIf->item(list_of_wifiname.at(0)->row(),2)->data(Qt::DisplayRole).toString();
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nasel ho " << name;
+ return name;
+ }
+}
+
+//===========================================================================
+/** ShowDialog
+For dialog for modifi calendars and profiles
+*/
+void NetWorkProfile::ShowDialog()
+{
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "dialog " ;
+ NetWorkdialogDialog dialog(this, settings);
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "ma setings " ;
+ dialog.SetViews(model_of_CellId,selModel_CellId,model_of_WifiIf,selModel_WifiIf);
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "modely " ;
+ dialog.SetIDWIFInames(CellLocation, WifiName);
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "lokaci a wifi " ;
+ dialog.SetProfilenames(list_of_profiles);
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "prily " ;
+ connect(&dialog,SIGNAL(s_change_model()),this,SLOT(ChangeInModel()));
+ dialog.exec();
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "konec " ;
+ disconnect(&dialog,SIGNAL(s_change_model()),this,SLOT(ChangeInModel()));
+}
+
+/** ChangeInModel.
+Slot for change in model table
+*/
+void NetWorkProfile::ChangeInModel()
+{
+ SetProfile();
+}
+
--- /dev/null
+#ifndef NETWORKPROFILE_H
+#define NETWORKPROFILE_H
+
+#include <QWidget>
+#include <QtCore/QString>
+#include <QSystemNetworkInfo>
+QTM_USE_NAMESPACE
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QStringList;
+class QSettings;
+class QTimer;
+
+/** \class NetWorkProfile
+ \brief class for setting profile based on network rules
+ */
+class NetWorkProfile : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit NetWorkProfile(QWidget *parent = 0, QSettings *sett = 0);
+ void Init();
+ void ShowDialog();
+ void createModels(QStandardItemModel * cellM, QStandardItemModel * wifiM);
+
+signals:
+ void s_network_profile(QString profile);
+
+public slots:
+ void SetProfilenames(QStringList list_of_profiles_n);
+ void DeletedProfile(QString name);
+
+private slots:
+ void ChangeInCellLocation();
+
+private:
+ QSystemNetworkInfo * p_networkcl;
+ QTimer *timer;
+ QSettings * settings;
+ QString profile_Currently;
+ QString CellLocation;
+ QString WifiName;
+
+ void SetProfile();
+
+ QString FindWifiNameInModel(QString WifiNam);
+ QString FindIDLocInModel(QString IDCell);
+
+ QStandardItemModel *model_of_CellId;
+ QItemSelectionModel *selModel_CellId;
+ QStandardItemModel *model_of_WifiIf;
+ QItemSelectionModel* selModel_WifiIf;
+
+ void setProfile();
+
+ QStringList list_of_profiles;
+
+ private slots:
+ void ChangeInModel();
+ void ChangeInWifiName(QSystemNetworkInfo::NetworkMode, QString );
+};
+
+#endif // NETWORKPROFILE_H
--- /dev/null
+#include "profil.h"
+
+
+Profil::Profil(QString name)
+{
+ m_name_of_profile = name;
+
+ list_of_profile_values.clear();
+
+ ringing_alert_tone.key = QString("ringing.alert.tone");
+ ringing_alert_tone.type = QString("SOUNDFILE");
+ list_of_profile_values.append(&ringing_alert_tone);
+
+ ringing_alert_type.key = QString("ringing.alert.type");
+ ringing_alert_type.type = QString("STRING \"Ringing\" \"Silent\"");
+ list_of_profile_values.append(&ringing_alert_type);
+
+ ringing_alert_volume.key = QString("ringing.alert.volume");
+ ringing_alert_volume.type = QString("INTEGER 0-100");
+ list_of_profile_values.append(&ringing_alert_volume);
+
+ calendar_alarm_enabled.key = QString("calendar.alarm.enabled");
+ calendar_alarm_enabled.type = QString("BOOLEAN");
+ list_of_profile_values.append(&calendar_alarm_enabled);
+
+ clock_alarm_enabled.key = QString("clock.alarm.enabled");
+ clock_alarm_enabled.type = QString("BOOLEAN");
+ list_of_profile_values.append(&clock_alarm_enabled);
+
+ email_alert_tone.key = QString("email.alert.tone");
+ email_alert_tone.type = QString("SOUNDFILE");
+ list_of_profile_values.append(&email_alert_tone);
+
+ email_alert_volume.key = QString("email.alert.volume");
+ email_alert_volume.type = QString("INTEGER 0-100");
+ list_of_profile_values.append(&email_alert_volume);
+
+ im_alert_tone.key = QString("im.alert.tone");
+ im_alert_tone.type = QString("SOUNDFILE");
+ list_of_profile_values.append(&im_alert_tone);
+
+ im_alert_volume.key = QString("im.alert.volume");
+ im_alert_volume.type = QString("INTEGER 0-100");
+ list_of_profile_values.append(&im_alert_volume);
+
+ keypad_sound_level.key = QString("keypad.sound.level");
+ keypad_sound_level.type = QString("INTEGER 0-2");
+ list_of_profile_values.append(&keypad_sound_level);
+
+
+
+
+ sms_alert_tone.key = QString("sms.alert.tone");
+ sms_alert_tone.type = QString("SOUNDFILE");
+ list_of_profile_values.append(&sms_alert_tone);
+
+ sms_alert_volume.key = QString("sms.alert.volume");
+ sms_alert_volume.type = QString("INTEGER 0-100");
+ list_of_profile_values.append(&sms_alert_volume);
+
+ system_sound_level.key = QString("system.sound.level");
+ system_sound_level.type = QString("INTEGER 0-2");
+ list_of_profile_values.append(&system_sound_level);
+
+ touchscreen_sound_level.key = QString("touchscreen.sound.level");
+ touchscreen_sound_level.type = QString("INTEGER 0-2");
+ list_of_profile_values.append(&touchscreen_sound_level);
+
+ vibrating_alert_enabled.key = QString("vibrating.alert.enabled");
+ vibrating_alert_enabled.type = QString("BOOLEAN");
+ list_of_profile_values.append(&vibrating_alert_enabled);
+}
+
+QList<ProfileValue* >* Profil::ListOfValues()
+{
+ return &list_of_profile_values;
+}
+
+bool Profil::SetValue(QString key, QString value)
+{
+ QList<ProfileValue *>* p_profile_values = ListOfValues();
+
+ for (int i = 0; i < p_profile_values->size(); ++i) {
+ if(p_profile_values->at(i)->key == key )//kdyz je proměnná bool
+ {
+ p_profile_values->at(i)->value = QVariant(value);
+ return true;
+ }
+ }
+ return false;
+}
+
+QString Profil::GetName()
+{
+ return m_name_of_profile;
+}
+
+void Profil::SetName(QString name)
+{
+ m_name_of_profile = name;
+}
+
+QVariant Profil::GetCalendarAlarmEnabled()
+{
+ return calendar_alarm_enabled.value;
+}
+
+QVariant Profil::GetClockAlarmEnabled()
+{
+ return clock_alarm_enabled.value;
+}
+
+QVariant Profil::GetEmailAlertTone()
+{
+ return email_alert_tone.value;
+}
+
+QVariant Profil::GetEmailAlertVolume()
+{
+ return email_alert_volume.value;
+}
+
+QVariant Profil::GetImAlertTone()
+{
+ return im_alert_tone.value;
+}
+
+QVariant Profil::GetImAlertVolume()
+{
+ return im_alert_volume.value;
+}
+
+QVariant Profil::GetKeypadSoundLevel()
+{
+ return keypad_sound_level.value;
+}
+
+QVariant Profil::GetRingingAlertTone()
+{
+ return ringing_alert_tone.value;
+}
+
+QVariant Profil::GetRingingAlertType()
+{
+ return ringing_alert_type.value;
+}
+
+QVariant Profil::GetRingingAlertVolume()
+{
+ return ringing_alert_volume.value;
+}
+
+QVariant Profil::GetSmsAlertTone()
+{
+ return sms_alert_tone.value;
+}
+
+QVariant Profil::GetSmsAlertVolume()
+{
+ return sms_alert_volume.value;
+}
+
+QVariant Profil::GetSystemSoundLevel()
+{
+ return system_sound_level.value;
+}
+
+QVariant Profil::GetTouchscreenSoundLevel()
+{
+ return touchscreen_sound_level.value;
+}
+
+QVariant Profil::GetVibratingAlertEnabled()
+{
+ return vibrating_alert_enabled.value;
+}
+
+
+void Profil::SetCalendarAlarmEnabled(QVariant a)
+{
+ calendar_alarm_enabled.value = a;
+}
+
+void Profil::SetClockAlarmEnabled(QVariant a)
+{
+ clock_alarm_enabled.value = a;
+}
+
+void Profil::SetEmailAlertTone(QVariant a)
+{
+ email_alert_tone.value = a;
+}
+
+void Profil::SetEmailAlertVolume(QVariant a)
+{
+ email_alert_volume.value = a;
+}
+void Profil::SetImAlertTone(QVariant a)
+{
+ im_alert_tone.value = a;
+}
+
+void Profil::SetImAlertVolume(QVariant a)
+{
+ im_alert_volume.value = a;
+}
+
+void Profil::SetKeypadSoundLevel(QVariant a)
+{
+ keypad_sound_level.value = a;
+}
+
+void Profil::SetRingingAlertTone(QVariant a)
+{
+ ringing_alert_tone.value = a;
+}
+
+void Profil::SetRingingAlertType(QVariant a)
+{
+ ringing_alert_type.value = a;
+}
+
+void Profil::SetRingingAlertVolume(QVariant a)
+{
+ ringing_alert_volume.value = a;
+}
+
+void Profil::SetSmsAlertTone(QVariant a)
+{
+ sms_alert_tone.value = a;
+}
+
+void Profil::SetSmsAlertVolume(QVariant a )
+{
+ sms_alert_volume.value = a;
+}
+
+void Profil::SetSystemSoundLevel(QVariant a)
+{
+ system_sound_level.value = a;
+}
+void Profil::SetTouchscreenSoundLevel(QVariant a)
+{
+ touchscreen_sound_level.value = a;
+}
+
+void Profil::SetVibratingAlertEnabled(QVariant a)
+{
+ vibrating_alert_enabled.value = a;
+}
+Profil::~Profil()
+{
+
+}
--- /dev/null
+#ifndef PROFIL_H
+#define PROFIL_H
+/*! \file profildow.h
+ \brief File .H for Class Profile
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ Header file
+*/
+#include <QtCore/QList>
+#include <QtCore/QString>
+#include <QtCore/QVariant>
+
+
+struct ProfileValue
+{
+ QString key;
+ QVariant value;
+ QString type;
+};
+
+/*!
+ \class Profil
+ \brief Class is used only for data storage as they are in the profiles and their transfer between objects.
+*/
+class Profil
+{
+public:
+ //! Profil(QString name).
+ /*!
+ The constructor receives the name of the profile
+ \param name Profile Name
+ */
+ Profil(QString name);
+ ~Profil();
+ QList<ProfileValue*>* ListOfValues(); /**< returns a list of links to data in the profile */
+ bool SetValue(QString key, QString value);
+ QString GetName();
+
+ QVariant GetCalendarAlarmEnabled();
+ QVariant GetClockAlarmEnabled();
+ QVariant GetEmailAlertTone();
+ QVariant GetEmailAlertVolume();
+ QVariant GetImAlertTone();
+ QVariant GetImAlertVolume();
+ QVariant GetKeypadSoundLevel();
+ QVariant GetRingingAlertTone();
+ QVariant GetRingingAlertType();
+ QVariant GetRingingAlertVolume();
+ QVariant GetSmsAlertTone();
+ QVariant GetSmsAlertVolume();
+ QVariant GetSystemSoundLevel();
+ QVariant GetTouchscreenSoundLevel();
+ QVariant GetVibratingAlertEnabled();
+
+ void SetName(QString);
+ void SetCalendarAlarmEnabled(QVariant);
+ void SetClockAlarmEnabled(QVariant);
+ void SetEmailAlertTone(QVariant);
+ void SetEmailAlertVolume(QVariant);
+ void SetImAlertTone(QVariant);
+ void SetImAlertVolume(QVariant);
+ void SetKeypadSoundLevel(QVariant);
+ void SetRingingAlertTone(QVariant);
+ void SetRingingAlertType(QVariant);
+ void SetRingingAlertVolume(QVariant);
+ void SetSmsAlertTone(QVariant);
+ void SetSmsAlertVolume(QVariant);
+ void SetSystemSoundLevel(QVariant);
+ void SetTouchscreenSoundLevel(QVariant);
+ void SetVibratingAlertEnabled(QVariant);
+
+private:
+ QString m_name_of_profile;
+ struct ProfileValue calendar_alarm_enabled;
+ struct ProfileValue clock_alarm_enabled;
+ struct ProfileValue email_alert_tone;
+ struct ProfileValue email_alert_volume;
+ struct ProfileValue im_alert_tone;
+ struct ProfileValue im_alert_volume;
+ struct ProfileValue keypad_sound_level;
+ struct ProfileValue ringing_alert_tone;
+ struct ProfileValue ringing_alert_type;
+ struct ProfileValue ringing_alert_volume;
+ struct ProfileValue sms_alert_tone;
+ struct ProfileValue sms_alert_volume;
+ struct ProfileValue system_sound_level;
+ struct ProfileValue touchscreen_sound_level;
+ struct ProfileValue vibrating_alert_enabled;
+
+ QList<ProfileValue *> list_of_profile_values;
+};
+
+#endif // PROFIL_H
--- /dev/null
+#include "profildialog.h"
+#include "ui_profildialog.h"
+
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+#include "profil.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QStandardItemModel>
+#include <QtCore/QStringList>
+#include <QtCore/QFileInfo>
+#include <QtGui/QFileDialog>
+#include <QtGui/QListView>
+#include <QtCore/QModelIndex>
+#include <QtCore/QVariant>
+#include <QtCore/Qt>
+#include <QtCore/QString>
+
+/** Constructor.
+Setup ui and create new objects for item model and maemo5
+value button and setup slider, check boxes atc. if dialog is use
+for update profile
+*/
+ProfilDialog::ProfilDialog(QStringList list_of_profiles_n, QWidget *parent, Profil * profil, QStandardItemModel * model) :
+ QDialog(parent),
+ ui(new Ui::ProfilDialog)
+{
+ ui->setupUi(this);
+
+ list_of_profiles_names = list_of_profiles_n; // save pointer
+ model_of_files = model;
+ profile = profil;
+ //edit profile or new profile
+ if(profil->GetName().isEmpty()) {
+ update = false;
+ setWindowTitle(tr("New profile"));
+ ui->slider_ringing_volume->setValue(0);
+ ui->slider_sms_volume->setValue(0);
+ ui->slider_im_volume->setValue(0);
+ ui->slider_email_volume->setValue(0);
+ } else {
+ update = true;
+ setWindowTitle(tr("Edit profile"));
+ ui->lineEdit_nameprofile->setText(profile->GetName());
+ ui->lineEdit_nameprofile->setDisabled(true);
+ ui->slider_ringing_volume->setValue(profile->GetRingingAlertVolume().toInt());
+ ui->slider_sms_volume->setValue(profile->GetSmsAlertVolume().toInt());
+ ui->slider_im_volume->setValue(profile->GetImAlertVolume().toInt());
+ ui->slider_email_volume->setValue(profile->GetEmailAlertVolume().toInt());
+ }
+ createMeamoButtons();
+ createRadioID();
+}
+
+/** destructor
+Delete ui
+*/
+ProfilDialog::~ProfilDialog()
+{
+ delete ui;
+}
+
+/** createMeamoButtons()
+Method will create Meamo5 buttons and sets
+pick selector for them
+*/
+void ProfilDialog::createMeamoButtons()
+{
+ selModelMobil = new QItemSelectionModel(model_of_files); //create new selection model
+ QListView * list_view = createListView(selModelMobil); //method will create QListview
+ QMaemo5ListPickSelector *listpicker1 = createMeamoListPick(list_view); //method will create QMaemo5ListPickSelector
+ if(update) //if update then select ringtone
+ {
+ setSelectedItem(listpicker1,selModelMobil,profile->GetRingingAlertTone().toString());
+ }
+ v1 = new QMaemo5ValueButton(tr("Ringing tone"), this); //create button
+ // v1->setIcon(QIcon::fromTheme("chat_smiley_happy"));
+ v1->setValueLayout(QMaemo5ValueButton::ValueUnderText);
+ v1->setPickSelector(listpicker1);//set list pick
+ ui->gridLayout->addWidget(v1,13,0,1,-1); // add to layout
+ //===========================================================================================================================
+ selModelSMS = new QItemSelectionModel(model_of_files);
+ list_view = createListView(selModelSMS);
+ QMaemo5ListPickSelector *listpicker2 = createMeamoListPick(list_view);
+ if(update)
+ {
+ setSelectedItem(listpicker2,selModelSMS,profile->GetSmsAlertTone().toString());
+ }
+ v2 = new QMaemo5ValueButton(tr("SMS tone"), this);
+ // v2->setIcon(QIcon::fromTheme("chat_smiley_happy"));
+ v2->setValueLayout(QMaemo5ValueButton::ValueUnderText);
+ v2->setPickSelector(listpicker2);
+ ui->gridLayout->addWidget(v2,14,0,1,-1);
+ //===========================================================================================================================
+ selModelIM = new QItemSelectionModel(model_of_files);
+ list_view = createListView(selModelIM);
+ QMaemo5ListPickSelector *listpicker3 = createMeamoListPick(list_view);
+ if(update)
+ {
+ setSelectedItem(listpicker3,selModelIM,profile->GetImAlertTone().toString());
+ }
+ v3 = new QMaemo5ValueButton(tr("IM tone"), this);
+ // v3->setIcon(QIcon::fromTheme("chat_smiley_happy"));
+ v3->setValueLayout(QMaemo5ValueButton::ValueUnderText);
+ v3->setPickSelector(listpicker3);
+ ui->gridLayout->addWidget(v3,15,0,1,-1);
+ //===========================================================================
+ selModelEmail = new QItemSelectionModel(model_of_files);
+ list_view = createListView(selModelEmail);
+ QMaemo5ListPickSelector *listpicker4 = createMeamoListPick(list_view);
+ if(update)
+ {
+ setSelectedItem(listpicker4,selModelEmail,profile->GetEmailAlertTone().toString());
+ }
+ v4 = new QMaemo5ValueButton(tr("E-mail tone"), this);
+ // v4->setIcon(QIcon::fromTheme("chat_smiley_happy"));
+ v4->setValueLayout(QMaemo5ValueButton::ValueUnderText);
+ v4->setPickSelector(listpicker4);
+ ui->gridLayout->addWidget(v4,16,0,1,-1);
+}
+
+/** createListView
+Method will create QListView and set edit triggers to NoEditTriggers,
+selection model, selection behavior to select rows and selection mode to single selection
+*/
+QListView * ProfilDialog::createListView(QItemSelectionModel * select_model)
+{
+ QListView * list_view = new QListView(this); //QListView::selectedItem() will return the selected QListViewItem*.
+ list_view->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ /*
+ MOdel má
+ QList<QStandardItem *> QStandardItemModel::findItems ( const QString & text, Qt::MatchFlags flags = Qt::MatchExactly, int column = 0 ) const
+
+ item má
+ QModelIndex QStandardItem::index () const
+
+ Model selected má
+ void QItemSelectionModel::select ( const QModelIndex & index, QItemSelectionModel::SelectionFlags command ) [virtual slot]
+
+ */
+ list_view->setModel(model_of_files);
+ list_view->setSelectionModel(select_model);
+ list_view->setSelectionBehavior(QAbstractItemView::SelectRows);
+ list_view->setSelectionMode(QAbstractItemView::SingleSelection);
+ return list_view;
+}
+
+/** createMeamoListPick
+Method will create QMaemo5ListPickSelector and set list pick model, model column and view
+*/
+QMaemo5ListPickSelector * ProfilDialog::createMeamoListPick(QListView * list_view)
+{
+ QMaemo5ListPickSelector *listpicker = new QMaemo5ListPickSelector(this);
+ listpicker->setModel(model_of_files);
+ listpicker->setModelColumn(0);
+ listpicker->setView(list_view);
+ return listpicker;
+}
+
+/** setSelectedItem
+Method will select right row for selction model and list picker
+*/
+void ProfilDialog::setSelectedItem(QMaemo5ListPickSelector * listpicker, QItemSelectionModel * selModel, QString find )
+{
+ QList<QStandardItem *> seznam_nalezenych;
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " co ma najit " << find;
+ seznam_nalezenych = model_of_files->findItems(find, Qt::MatchExactly, 1);//find itemm
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " Co nasel" << seznam_nalezenych;
+ if(!seznam_nalezenych.empty()){
+ selModel->select(seznam_nalezenych.at(0)->index(),QItemSelectionModel::Select | QItemSelectionModel::Rows);
+ listpicker->setCurrentIndex(seznam_nalezenych.at(0)->row());
+ }
+}
+
+/** accept()
+Slot for signal when user click on save button.
+Check is everyting is OK and save values into profile object
+*/
+void ProfilDialog::accept()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " tisk všech dat";
+
+ if(ui->lineEdit_nameprofile->text().isEmpty()){
+ QMaemo5InformationBox::information(this, tr("Profile must have name"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+ if(update == false){
+ if(list_of_profiles_names.contains(ui->lineEdit_nameprofile->text()))
+ {
+ QMaemo5InformationBox::information(this, tr("This profile elready exist"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+ }
+
+ if(ui->lineEdit_nameprofile->text().split(QRegExp("\\s+"),QString::SkipEmptyParts).size() > 1)
+ {
+ QMaemo5InformationBox::information(this, tr("One word name please"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if(ui->lineEdit_nameprofile->text().contains(QRegExp("^\\d\\D*")))
+ {
+ QMaemo5InformationBox::information(this, tr("You can't start name with digit"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ QModelIndexList list_of_Mobil_tone = selModelMobil->selectedIndexes();
+ if(list_of_Mobil_tone.empty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select ringtone for mobile"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ QModelIndexList list_of_SMS_tone = selModelSMS->selectedIndexes();
+ if(list_of_SMS_tone.empty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select ringtone for SMS"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ QModelIndexList list_of_IM_tone = selModelIM->selectedIndexes();
+ if(list_of_IM_tone.empty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select ringtone for IM"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ QModelIndexList list_of_Email_tone = selModelEmail->selectedIndexes();
+ if(list_of_Email_tone.empty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select ringtone for E-mail"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ // QModelIndexList list = selModelMobil->selectedIndexes();
+ //
+ // for(int i = 0; i < list.size(); i++) {
+ // //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << list.at(i).data().toString();
+ ////}
+
+ // //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << " tisk dat z dialogu";
+ // //qDebug() << "text je " << ui->lineEdit_nameprofile->text();
+ // //qDebug() << "email volume je " << ui->slider_email_volume->value();
+ // //qDebug() << "im volume je " << ui->slider_im_volume->value();
+ // //qDebug() << "ring volume je " << ui->slider_ringing_volume->value();
+ // //qDebug() << "sms volume je " << ui->slider_sms_volume->value();
+ // //qDebug() << "key board je " << ui->buttonGroup_keyboard->checkedId();
+ // //qDebug() << "screen je " << ui->buttonGroup_screen->checkedId();
+ // //qDebug() << "system je " << ui->buttonGroup_system->checkedId();
+ // //qDebug() << list_of_Mobil_tone.at(1).data().toString() ;
+ // //qDebug() << "zvuk SMS " << list_of_SMS_tone.at(1).data().toString() ;
+ // //qDebug() << "zvuk Im " << list_of_IM_tone.at(1).data().toString() ;
+ // //qDebug() << "zvuk email " << list_of_Email_tone.at(1).data().toString() ;
+ // //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "konec tisku dat z dialogu";
+ //m_settings->setValue("Settings/rememberGeometry", geometryCb->isChecked());
+
+ profile->SetName(ui->lineEdit_nameprofile->text());
+
+ profile->SetRingingAlertVolume(QVariant(ui->slider_ringing_volume->value()));
+ profile->SetSmsAlertVolume(QVariant(ui->slider_im_volume->value()));
+ profile->SetImAlertVolume(QVariant(ui->slider_im_volume->value()));
+ profile->SetEmailAlertVolume(QVariant(ui->slider_email_volume->value()));
+
+ profile->SetKeypadSoundLevel(QVariant(ui->buttonGroup_keyboard->checkedId()));
+ profile->SetTouchscreenSoundLevel(QVariant(ui->buttonGroup_screen->checkedId()));
+ profile->SetSystemSoundLevel(QVariant(ui->buttonGroup_system->checkedId()));
+
+ profile->SetRingingAlertTone(list_of_Mobil_tone.at(1).data());
+ profile->SetSmsAlertTone(list_of_SMS_tone.at(1).data());
+ profile->SetImAlertTone(list_of_IM_tone.at(1).data());
+ profile->SetEmailAlertTone(list_of_Email_tone.at(1).data());
+
+ profile->SetVibratingAlertEnabled(QVariant((int)ui->check_vibration->isChecked()));
+ profile->SetRingingAlertType(QVariant(QString("ringing")));
+
+ switch (ui->buttonGroup_ringing->checkedId())
+ {
+ case 0:
+ profile->SetRingingAlertType(QVariant(QString("ringing")));
+ break;
+ case 1:
+ profile->SetRingingAlertType(QVariant(QString("silent")));
+ break;
+ default:
+ profile->SetRingingAlertType(QVariant(QString("ringing")));
+ }
+
+ profile->SetCalendarAlarmEnabled(QVariant((int)ui->checkCalendarAlarm->isChecked()));
+ profile->SetClockAlarmEnabled(QVariant((int)ui->checkClockAlarm->isChecked()));
+
+ done(QDialog::Accepted);
+}
+
+/** createRadioID()
+Method setup Radio buttons
+If updating profile setradio buttons to profile values
+*/
+void ProfilDialog::createRadioID()
+{
+ ui->buttonGroup_system->setId(ui->radioB_system1, 0);
+ ui->buttonGroup_system->setId(ui->radioB_system2, 1);
+ ui->buttonGroup_system->setId(ui->radioB_system3, 2);
+
+ ui->buttonGroup_keyboard->setId(ui->radioB_keyboard_1,0);
+ ui->buttonGroup_keyboard->setId(ui->radioB_keyboard_2,1);
+ ui->buttonGroup_keyboard->setId(ui->radioB_keyboard_3,2);
+
+ ui->buttonGroup_screen->setId(ui->radioB_screen_1,0);
+ ui->buttonGroup_screen->setId(ui->radioB_screen_2,1);
+ ui->buttonGroup_screen->setId(ui->radioB_screen_3,2);
+
+ ui->buttonGroup_ringing->setId(ui->radioButton_ringing,0);
+ ui->buttonGroup_ringing->setId(ui->radioButton_silent,1);
+
+ if(update)
+ {
+ if(profile->GetRingingAlertType().toString().contains(QString("ringing")))
+ {
+ ui->radioButton_ringing->setChecked(true);
+ } else {
+ ui->radioButton_silent->setChecked(true);
+ }
+ ui->check_vibration->setChecked(profile->GetVibratingAlertEnabled().toBool());
+ ui->checkCalendarAlarm->setChecked(profile->GetCalendarAlarmEnabled().toBool());
+ ui->checkClockAlarm->setChecked(profile->GetClockAlarmEnabled().toBool());
+ } else {
+ ui->radioButton_ringing->setChecked(true);
+ }
+
+ switch (profile->GetSystemSoundLevel().toInt())
+ {
+ case 0:
+ ui->radioB_system1->setChecked(true);
+ break;
+ case 1:
+ ui->radioB_system2->setChecked(true);
+ break;
+ case 2:
+ ui->radioB_system3->setChecked(true);
+ break;
+ default:
+ ui->radioB_system1->setChecked(true);
+ }
+
+ switch (profile->GetKeypadSoundLevel().toInt())
+ {
+ case 0:
+ ui->radioB_keyboard_1->setChecked(true);
+ break;
+ case 1:
+ ui->radioB_keyboard_2->setChecked(true);
+ break;
+ case 2:
+ ui->radioB_keyboard_3->setChecked(true);
+ break;
+ default:
+ ui->radioB_keyboard_1->setChecked(true);
+ }
+
+ switch (profile->GetKeypadSoundLevel().toInt())
+ {
+ case 0:
+ ui->radioB_screen_1->setChecked(true);
+ break;
+ case 1:
+ ui->radioB_screen_2->setChecked(true);
+ break;
+ case 2:
+ ui->radioB_screen_3->setChecked(true);
+ break;
+ default:
+ ui->radioB_screen_1->setChecked(true);
+ }
+}
+
+/** on_ButtonLoadSound_clicked()
+Slot for loading music files
+*/
+void ProfilDialog::on_ButtonLoadSound_clicked()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Choose sound file"),"/home/user",tr("Sound files (*.wav *.mp3 *.AAC *.eAAC* *.acc *.wma *.m4a)"));
+
+ if (fileName.isEmpty())
+ return;
+
+ QFileInfo file(fileName);
+
+ QList<QStandardItem *> items;
+
+ if(model_of_files != NULL)
+ if(checkFileInModelAndExist(file)){
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " bude se pridavat do modelu toto" << file.absoluteFilePath();
+ items.append(new QStandardItem(file.fileName()));
+ items.append(new QStandardItem(file.absoluteFilePath()));
+ model_of_files->appendRow(items);
+ }
+}
+
+/** checkFileInModelAndExist()
+Check if this audio file is already added
+*/
+bool ProfilDialog::checkFileInModelAndExist(QFileInfo inf)
+{
+ if(!inf.exists()) return false;
+ if(!model_of_files->findItems(inf.absoluteFilePath(),Qt::MatchExactly, 1).empty()) return false;
+ return true;
+}
+
+/** on_slider_ringing_volume_valueChanged
+Slot for changing volume in text label
+*/
+void ProfilDialog::on_slider_ringing_volume_valueChanged(int value)
+{
+ QString str;
+ str = "%1 %2";
+ ui->label_ringing_volume->setText(str.arg(tr("Ringing:"),QString().setNum(value)));
+}
+
+/** on_slider_sms_volume_valueChanged
+Slot for changing volume in text label
+*/
+void ProfilDialog::on_slider_sms_volume_valueChanged(int value)
+{
+ QString str;
+ str = "%1 %2";
+ ui->label_sms_volume->setText(str.arg(QString("SMS:"),QString().setNum(value)));
+}
+
+/** on_slider_im_volume_valueChanged
+Slot for changing volume in text label
+*/
+void ProfilDialog::on_slider_im_volume_valueChanged(int value)
+{
+ QString str;
+ str = "%1 %2";
+ ui->label_im_volume->setText( str.arg(QString("IM:"),QString().setNum(value)));
+}
+
+/** on_slider_email_volume_valueChanged
+Slot for changing volume in text label
+*/
+void ProfilDialog::on_slider_email_volume_valueChanged(int value)
+{
+ QString str;
+ str = "%1 %2";
+ ui->label_email_volume->setText( str.arg(QString("E-mail:"),QString().setNum(value)));
+}
+
+/** changeEvent(QEvent *e)
+
+*/
+void ProfilDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
--- /dev/null
+#ifndef PROFILDIALOG_H
+#define PROFILDIALOG_H
+/*! \file profildialog.h
+ \brief File .H for Class profile dialog
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+ Header file
+*/
+#include <QDialog>
+
+class QMaemo5ValueButton;
+class Profil;
+class QStandardItemModel;
+class QStringList;
+class QModelIndex;
+class QListView;
+class QItemSelectionModel;
+class QMaemo5ListPickSelector;
+class QFileInfo;
+namespace Ui {
+ class ProfilDialog;
+}
+
+/*!
+ \class ProfilDialog
+ \brief Class for the dialog to create or edit profiles
+*/
+class ProfilDialog : public QDialog {
+ Q_OBJECT
+public:
+ ProfilDialog(QStringList list_of_profiles_n, QWidget *parent = 0, Profil *profil = NULL, QStandardItemModel *model = NULL);
+ ~ProfilDialog();
+
+protected:
+ void changeEvent(QEvent *e);
+ void accept();
+
+private:
+ Ui::ProfilDialog *ui;
+ QMaemo5ValueButton *v1;
+ QMaemo5ValueButton *v2;
+ QMaemo5ValueButton *v3;
+ QMaemo5ValueButton *v4;
+ bool update;
+
+ void createMeamoButtons();
+ void createRadioID();
+
+ int id_ButtonGroup_system;
+ int id_ButtonGroup_keyboard;
+ int id_ButtonGroup_screen;
+
+ QStandardItemModel *model_of_files;
+ bool checkFileInModelAndExist(QFileInfo inf);
+ QStringList list_of_profiles_names;
+ Profil * profile;
+ QItemSelectionModel* selModelMobil;
+ QItemSelectionModel* selModelSMS;
+ QItemSelectionModel* selModelIM;
+ QItemSelectionModel* selModelEmail;
+
+ QListView * createListView(QItemSelectionModel * select_model);
+ QMaemo5ListPickSelector * createMeamoListPick(QListView * list_view);
+ void setSelectedItem(QMaemo5ListPickSelector * listpicker, QItemSelectionModel * selModel, QString find );
+
+private slots:
+ void on_slider_email_volume_valueChanged(int value);
+ void on_slider_im_volume_valueChanged(int value);
+ void on_slider_sms_volume_valueChanged(int value);
+ void on_slider_ringing_volume_valueChanged(int value);
+ void on_ButtonLoadSound_clicked();
+ // void buttonGroup_system_clicked(int);
+ // void buttonGroup_keyboard_clicked(int);
+ // void buttonGroup_screen_clicked(int);
+ // void pokus_clicked(QModelIndex& );
+
+};
+#endif // PROFILDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ProfilDialog</class>
+ <widget class="QDialog" name="ProfilDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="ButtonSave">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ButtonLoadSound">
+ <property name="text">
+ <string>New tone</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>768</width>
+ <height>388</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_name_profil">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Profile</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLineEdit" name="lineEdit_nameprofile"/>
+ </item>
+ <item row="1" column="0" colspan="3">
+ <widget class="QCheckBox" name="check_vibration">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Vibration Enabled</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="2">
+ <widget class="QLabel" name="label_sms_volume">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>SMS: 0</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QSlider" name="slider_sms_volume">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0" colspan="2">
+ <widget class="QLabel" name="label_im_volume">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>IM: 0</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <widget class="QSlider" name="slider_im_volume">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="label_email_volume">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>E-mail: 0 </string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <widget class="QSlider" name="slider_email_volume">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QSlider" name="slider_ringing_volume">
+ <property name="maximumSize">
+ <size>
+ <width>33333</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2">
+ <widget class="QLabel" name="label_ringing_volume">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Ringing:0</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0">
+ <item>
+ <widget class="QRadioButton" name="radioB_system1">
+ <property name="text">
+ <string>Off</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_system</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_system2">
+ <property name="text">
+ <string>Level 1</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_system</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_system3">
+ <property name="text">
+ <string>Level 2</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_system</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="9" column="0">
+ <widget class="QLabel" name="label_system_sounds">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>System sound</string>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="0">
+ <widget class="QLabel" name="label_keyboard_sounds">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Keyboard sounds</string>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QRadioButton" name="radioB_keyboard_1">
+ <property name="text">
+ <string>Off</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_keyboard</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_keyboard_2">
+ <property name="text">
+ <string>Level 1</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_keyboard</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_keyboard_3">
+ <property name="text">
+ <string>Level 2</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_keyboard</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="11" column="0">
+ <widget class="QLabel" name="label_screen_sounds">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Screen sounds</string>
+ </property>
+ </widget>
+ </item>
+ <item row="11" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QRadioButton" name="radioB_screen_1">
+ <property name="text">
+ <string>Off</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_screen</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_screen_2">
+ <property name="text">
+ <string>Level 1</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_screen</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioB_screen_3">
+ <property name="text">
+ <string>Level 2</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_screen</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" colspan="3">
+ <widget class="QCheckBox" name="checkCalendarAlarm">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Calendar Alarm Enabled</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="3">
+ <widget class="QCheckBox" name="checkClockAlarm">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Clock Alarm Enabled</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_ringing_type">
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Ringing type</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QRadioButton" name="radioButton_ringing">
+ <property name="text">
+ <string>Ringing</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_ringing</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioButton_silent">
+ <property name="text">
+ <string>Silent</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup_ringing</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>ButtonSave</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfilDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>189</x>
+ <y>16</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>3</x>
+ <y>29</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <buttongroups>
+ <buttongroup name="buttonGroup_keyboard"/>
+ <buttongroup name="buttonGroup_screen"/>
+ <buttongroup name="buttonGroup_system"/>
+ <buttongroup name="buttonGroup_ringing"/>
+ </buttongroups>
+</ui>
--- /dev/null
+#include "profiledb.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtXml/QDomElement>
+#include <QtCore/QStringList>
+#include <QtCore/QTextStream>
+#include <QtCore/QString>
+#include "profil.h"
+#include <QtGui/QStandardItemModel>
+
+/** Constructor
+Sets the pointer to the object to connect to deamon to NULL
+*/
+ProfileDB::ProfileDB(QObject *parent) :
+ QObject(parent),
+ profile_manager(new ProfilesManager(this)),
+ sound_files_manager(new SoundFilesManager(this)),
+ rules_manager(new RulesManager(this))
+{
+
+}
+
+/** Destructor
+Deletes the object to connect to deamon
+*/
+ProfileDB::~ProfileDB()
+{
+
+}
+
+/** Init
+ Creates an object ProfileDeamon and connects via ProfileDeamon: ConnectToDeamon
+ Create a model that will list all audio files
+ Then initializes the XML file using InitFile()
+ If the file exists so it attempts to read with readfile()
+ and if not it creates and initializes using CreateFile()
+*/
+bool ProfileDB::Init()
+{
+ if(profile_manager->Init() == false){
+ return false;
+ }
+ if(sound_files_manager->Init(profile_manager->GetRootElement()) == false)
+ {
+ return false;
+ }
+ if(rules_manager->Init() == false)
+ {
+ return false;
+ }
+return true;
+}
+
+
+
+//=============================================================
+ProfilesManager *ProfileDB::GetProfileManager() const
+{
+ return profile_manager;
+}
+
+SoundFilesManager *ProfileDB::GetSoundFilesManager() const
+{
+ return sound_files_manager;
+}
+
+RulesManager *ProfileDB::GetRulesManager() const
+{
+ return rules_manager;
+}
+
+void ProfileDB::SaveProfilesToXml()
+{
+ profile_manager->SaveProfilesToXml();
+ rules_manager->SaveProfilesToXml();
+
+}
+
+//================================================================
+//=============================================================================================================
+//=============================================================================================================
+
--- /dev/null
+#ifndef PROFILEDB_H
+#define PROFILEDB_H
+/*! \file profiledb.h
+ \brief File .H for class profiledb
+
+ Header file
+*/
+#include <QtCore/QObject>
+#include <QtCore/QDir>
+/*!
+ \class ProfileDB
+ \brief Class stores and retrieves the profiles from XML
+ \author Jakub Šplíchal <jakub.bzouk@gmail.com>
+*/
+#include "profilesmanager.h"
+#include "soundfilesmanager.h"
+#include "rulesmanager.h"
+
+class ProfileDB : public QObject
+{
+ Q_OBJECT
+public:
+ ProfileDB(QObject *parent = 0);
+ ~ProfileDB();
+
+ bool Init();
+
+ ProfilesManager *GetProfileManager() const;
+
+ SoundFilesManager *GetSoundFilesManager() const;
+
+ RulesManager *GetRulesManager() const;
+
+private:
+ ProfilesManager *profile_manager;
+ SoundFilesManager *sound_files_manager;
+ RulesManager *rules_manager;
+
+public slots:
+ void SaveProfilesToXml();
+};
+
+#endif // PROFILEDB_H
--- /dev/null
+#include <libprofile.h> // knihovna pro přípojení k profile deamonu
+#include <QtCore/QDebug> //Debug pro informace
+#include "profiledeamon.h"
+#include "profil.h"
+
+/** Constructor.
+Empty.
+*/
+ProfileDeamon::ProfileDeamon(QObject *parent) :
+ QObject(parent)
+{
+
+}
+
+/** Destruktor.
+*/
+ProfileDeamon::~ProfileDeamon()
+{
+ //odpojím se
+ profile_tracker_quit();
+}
+
+/** ConnectToDeamon()
+ Connect to profile deamon
+*/
+
+/**
+ V dbusus je funkce
+dbus_message_new_signal ( const char * path,
+ const char * interface,
+ const char * name
+ )
+
+Parameters:
+ path the path to the object emitting the signal
+ interface the interface the signal is emitted from
+ name name of the signal
+
+v DB na calendar je
+static const char* CALENDAR_DBUS_LISTENER_SERVICE = "com.nokia.calendar";
+static const char* CALENDAR_DBUS_OBJECT_PATH = "/com/nokia/calendar";
+static const char* CALENDAR_DBUS_LISTENER_SIGNAL = "dbChange";
+
+ dbusMessage = dbus_message_new_signal(CALENDAR_DBUS_OBJECT_PATH,
+ CALENDAR_DBUS_LISTENER_SERVICE,
+ CALENDAR_DBUS_LISTENER_SIGNAL);
+
+
+ lib profile má
+#define PROFILED_SERVICE "com.nokia.profiled"
+#define PROFILED_PATH "/com/nokia/profiled"
+#define PROFILED_INTERFACE "com.nokia.profiled"
+ #define PROFILED_CHANGED "profile_changed
+
+ v QT4
+ bool QDBusConnection::connect ( const QString & service, const QString & path, const QString & interface,
+ const QString & name, QObject * receiver, const char * slot )
+ */
+
+/** ConnectToDeamon()
+connect to profiled deamon
+*/
+bool ProfileDeamon::ConnectToDeamon()
+{
+ int a = 0;
+ profile_connection_enable_autoconnect(); // nastavím
+
+ if((a = profile_tracker_init()) != 0){
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "cannot connect to deamon";
+ return false;
+ }
+ //profile_track_add_active_cb(profileTrack, NULL, unlo );
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "connected to deamon";
+ // QDBusConnection con = QDBusConnection::connectToBus(QDBusConnection::SessionBus,QString("muj"));
+
+ //if(con.isConnected()) //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "neeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pripojen";
+ return true;
+}
+
+/** SetProfile( Profil * profil)
+ Set profile
+ \param profil reference to an object with the data profile
+*/
+bool ProfileDeamon::SetProfile( Profil * profil)
+{
+
+ //list of all the values in the profile
+ QList<ProfileValue *>* p_profile_values = profil->ListOfValues();
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nastavuji:";
+ for (int i = 0; i < p_profile_values->size(); ++i) {
+
+ if(p_profile_values->at(i)->type.contains("SOUNDFILE"))//kdyz je proměnná text
+ {
+ // qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "nastavuji:" << p_profile_values->at(i)->key << "hodnota " << p_profile_values->at(i)->value.toString();
+ if(profile_set_value("general", p_profile_values->at(i)->key.toLatin1().data(), p_profile_values->at(i)->value.toString().toLatin1().data()) == -1){
+ return false;
+ }
+ }else if(p_profile_values->at(i)->type.contains("BOOLEAN"))//kdyz je proměnná bool
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "nastavuji:" << p_profile_values->at(i)->key;
+ if(profile_set_value_as_bool("general", p_profile_values->at(i)->key.toLatin1().data(), p_profile_values->at(i)->value.toBool()) == -1){
+ return false;
+ }
+ }else if(p_profile_values->at(i)->type.contains("INTEGER"))//kdyz je proměnná int
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "nastavuji:" << p_profile_values->at(i)->key;
+ if(profile_set_value_as_int("general", p_profile_values->at(i)->key.toLatin1().data(), p_profile_values->at(i)->value.toInt()) == -1){
+ return false;
+ }
+ }else if(p_profile_values->at(i)->type.contains("STRING"))//kdyz je proměnná text
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "nastavuji:" << p_profile_values->at(i)->key;
+ if(profile_set_value("general", p_profile_values->at(i)->key.toLatin1().data(), p_profile_values->at(i)->value.toString().toLatin1().data()) == -1){
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/** GetProfile(QString profil_name)
+ Return profile (general a silent)
+ \param profil_name Profile Name
+*/
+Profil ProfileDeamon::GetProfile(QString profil_name)
+{
+ Profil profil(profil_name);
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Get profile from deamon";
+ profileval_t* data_profile = profile_get_values(profil_name.toLatin1().data());
+ for(int i = 0; i < 15; i++)
+ {
+ //qDebug() << i + 1;
+ //qDebug() << "|->>>klic: " << data_profile[i].pv_key ;
+ //qDebug() << "|->>>hodnota: " << data_profile[i].pv_val ;
+ //qDebug() << "|->>>typ: " << data_profile[i].pv_type ;
+ //deamon return bool value on or off
+ if(data_profile[i].pv_type == QString("BOOLEAN")){
+ if(data_profile[i].pv_val == QString("On")){
+ profil.SetValue(data_profile[i].pv_key, "1");
+ } else {
+ profil.SetValue(data_profile[i].pv_key, "0");
+ }
+ } else {
+ profil.SetValue(data_profile[i].pv_key, data_profile[i].pv_val);
+ }
+ }
+ //free
+ profile_free_values(data_profile);
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "return from getprofile";
+ return profil;
+}
--- /dev/null
+#ifndef PROFILEDEAMON_H
+#define PROFILEDEAMON_H
+/*! \file profiledeamon.h
+ \brief File .H for class ProfileDeamon
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+Header file
+*/
+#include <QtCore/QObject>
+
+class Profil;
+class QDBusMessage;
+/*!
+ \class ProfileDeamon
+ \brief Class for configuring profiles
+ Class set profiles, N900 includes only the two profiles, "general" and "Silent"
+*/
+class ProfileDeamon : public QObject
+{
+ Q_OBJECT
+public:
+ ProfileDeamon(QObject *parent = 0);
+ ~ProfileDeamon();
+
+ bool SetProfile( Profil * profil);
+ Profil GetProfile(QString profil_name);
+ bool ConnectToDeamon();
+};
+
+#endif // PROFILEDEAMON_H
--- /dev/null
+#include "profilesmanager.h"
+#include "profiledeamon.h"
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtXml/QDomElement>
+#include <QtCore/QStringList>
+#include <QtCore/QTextStream>
+#include <QtCore/QString>
+#include "profil.h"
+#include <QtGui/QStandardItemModel>
+ProfilesManager::ProfilesManager(QObject *parent) :
+ QObject(parent)
+{
+}
+
+/** Init
+ Creates an object ProfileDeamon and connects via ProfileDeamon: ConnectToDeamon
+ Create a model that will list all audio files
+ Then initializes the XML file using InitFile()
+ If the file exists so it attempts to read with readfile()
+ and if not it creates and initializes using CreateFile()
+*/
+bool ProfilesManager::Init()
+{
+ //connect
+ if(profile_deamon->ConnectToDeamon() == false)
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot connect";
+ return false;
+ }
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "bude init file ================= ";
+ //open the file
+ if(InitFile() == false) {
+ return false;
+ }
+
+ if(file.exists()) {
+ if(ReadFile() == true){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "File read";
+ emit s_profiles_name_change(GetProfilesNames());
+ return true;
+ } else {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "neco spatne ve sceni souborů================= ";
+ return false;
+ }
+ } else {
+ if(CreateFile() == true){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "file created";
+ //(general a silent)
+ Profil general = profile_deamon->GetProfile("general");
+ Profil silent = profile_deamon->GetProfile("silent");
+ CreateProfile(&general);
+ CreateProfile(&silent);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "added two profiles general silent ";
+ emit s_profiles_name_change(GetProfilesNames());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ return false;
+}
+//=============================================================
+/** InitFile
+Opens home folder and check if there is an dir NProfile and if not that it creates it
+and set the file to Dir.filePath(profiles.xml)
+*/
+bool ProfilesManager::InitFile()
+{
+ QDir Dir = QDir::homePath();
+
+ //vytvori slozku pokud neni
+ if(!Dir.exists("NProfile")){
+ if(!Dir.mkdir("NProfile")){
+ qWarning() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "Cannot create folder NProfile in home";
+ return false;
+ }
+ }
+ //switches to a folder
+ if(!Dir.cd("NProfile")){
+ qWarning() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "cannot cd in NProfile";
+ return false;
+ }
+
+ file.setFileName(Dir.filePath("profiles.xml")); //set
+ return true;
+}
+
+/** ReadFile
+Opens a file and reads the XML document using domDocument.setContent and check it with checkDomDoc ()
+*/
+bool ProfilesManager::ReadFile()
+{
+ if (!file.open(QIODevice::ReadWrite | QIODevice::Text)){
+ //////qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "Cannot open file";
+ return false;
+ }
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+ if (!domDocument.setContent((QIODevice * )&file, false, &errorStr, &errorLine,
+ &errorColumn)) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot set content " << errorStr << "line " << errorLine << "Column " << errorColumn;
+ file.close();
+ return false;
+ }
+
+ //control
+ if(!CheckDomDoc()) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in document, this is not calendar file ";
+ file.close();
+ return false;
+ }
+ // print();
+ file.close();
+ return true;
+}
+
+/** CreateFile
+Open the file and create XML using createXmlText () and write to a file.
+Sets the document and check with domDocument.setContent checkDomDoc ()
+and closes the file.
+*/
+bool ProfilesManager::CreateFile()
+{ //otevřu
+ if (!file.open(QIODevice::ReadWrite | QIODevice::Text)){
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot open file";
+ return false;
+ }
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+ QTextStream out(&file);
+ QString text = CreateXmlText(); //create text xml
+ out.setCodec("UTF-8");//set utf 8
+ out.setAutoDetectUnicode(true);
+ out << text;//write
+ out.flush(); //
+
+ if (!domDocument.setContent(text, false, &errorStr, &errorLine,
+ &errorColumn)) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot set content " << errorStr << "line " << errorLine << "Column " << errorColumn;
+ file.close();
+ return false;
+ }
+ //check
+ if(!CheckDomDoc()) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in document, this is not calendar file ";
+ file.close();
+ return false;
+ }
+ file.close();//close
+ return true;
+}
+
+/** createXmlText
+Creates the xml text
+*/
+QString ProfilesManager::CreateXmlText()
+{
+ QString text("");
+ text += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ text += "<!DOCTYPE NProf>\n";
+ text +="<NProf version=\"1.0\">\n";//začátek
+ text += "</NProf>\n";//konec souboru
+ return text;
+}
+
+/** checkDomDoc
+Checks if the document is in order
+*/
+bool ProfilesManager::CheckDomDoc()
+{
+ QDomElement root = domDocument.documentElement();
+ if (root.tagName() != "NProf") {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in root";
+ return false;
+ } else if (root.hasAttribute("version")
+ && root.attribute("version") != "1.0") {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in version";
+ return false;
+ }
+ return true;
+}
+
+
+//=============================================================================================================
+//http://www.decompile.com/cpp/faq/file_and_line_error_string.htm
+// pro //////qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ <<
+
+/** SaveProfilesToXml
+Saves the document to a file
+*/
+void ProfilesManager::SaveProfilesToXml()
+{
+
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Text)){
+ //////qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "nejde otevrit soubor";
+ }
+ QTextStream out(&file);
+ out.setCodec("UTF-8");
+ out.setAutoDetectUnicode(true);
+ out << domDocument.toString();
+ out.flush();
+ file.close();//close file
+}
+
+/** GetProfilesNames
+Returns a list of names of profiles
+*/
+QStringList ProfilesManager::GetProfilesNames()
+{
+ QStringList profiles_names = QStringList();
+ QDomElement root = domDocument.documentElement();
+ QDomElement first = root.firstChildElement();
+ while(!first.isNull()) {
+ profiles_names.append( first.tagName());
+ first = first.nextSiblingElement();
+ }
+ return profiles_names;
+}
+//=============================================================================================================
+/** GetRootElemetn
+ Get root element
+ */
+QDomElement ProfilesManager::GetRootElement() const
+{
+ return domDocument.documentElement();
+}
+
+/** GetProfile
+Returns an object filled with data
+ \param profil Pointer to object to the data of the profile
+*/
+bool ProfilesManager::GetProfile(Profil * profil)
+{
+ QDomElement root = domDocument.documentElement();
+ QDomElement profil_xml = root.firstChildElement(profil->GetName()); // find profile
+
+ if(profil_xml.isNull()) return false;// if not found return
+
+ QDomElement n = profil_xml.firstChildElement(); //ziskám první prvek
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Get profile from xml";
+
+ while(!n.isNull())
+ {
+ ////qDebug() << "Element name and text: " << n.tagName() << n.text();
+ profil->SetValue(n.tagName(), n.text());
+ n = n.nextSiblingElement();
+ }
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " return";
+ return true;
+}
+
+/** CreateProfile
+Saves profile data to XML document and emit a signal, added or delete profile
+ \param Data Pointer to an object with data of the profile
+*/
+bool ProfilesManager::CreateProfile(Profil *Data)
+{
+ QDomElement root = domDocument.documentElement();
+ QDomElement ui = CreateNewProfile(Data);
+ root.appendChild(ui);
+ emit s_profiles_name_change(GetProfilesNames());
+ return true;
+}
+
+/** UpdateProfile
+Changes in the profile data
+ \param Data Pointer to an object with data on the profile
+*/
+void ProfilesManager::UpdateProfile(Profil * Data )
+{
+ QDomElement root = domDocument.documentElement();
+ QDomElement profil_old = root.firstChildElement(Data->GetName());
+ QDomElement profil_new = this->CreateNewProfile(Data);
+ root.replaceChild(profil_new, profil_old);
+ emit s_profile_update(Data->GetName());
+}
+
+/** DeleteProfile
+Delete profile
+ \param profile_name name of profile
+*/
+void ProfilesManager::DeleteProfile(QString profile_name)
+{
+ QDomElement root = domDocument.documentElement();
+ root.removeChild(root.firstChildElement(profile_name)); // find element end delete
+ ////qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "smazan a emit";
+ emit s_delete_Profiles_Name_From_Models(profile_name);
+ emit s_profiles_name_change(GetProfilesNames());
+}
+
+
+/** createNewProfile
+Creates records in the XLM document
+ \param Data Pointer to an object with data on the profile
+*/
+QDomElement ProfilesManager::CreateNewProfile( Profil *Data)
+{
+ QDomElement ui = domDocument.createElement(Data->GetName()); //create element
+ QList<ProfileValue *>* p_profile_values = Data->ListOfValues();
+ for (int i = 0; i < p_profile_values->size(); ++i)
+ {
+ CreateNode(&ui, p_profile_values->at(i)->key, p_profile_values->at(i)->type, p_profile_values->at(i)->value.toString());
+ }
+ return ui;
+}
+
+/** createNode
+Creates an item in the XML file and adds it to the record
+ \param profil Pointer to the element in xml
+ \param name Name
+ \param attribute attribute of item
+ \param text text in item
+*/
+void ProfilesManager::CreateNode(QDomElement * profil, QString name, QString attribute, QString text)
+{
+ QDomElement ProfilData = domDocument.createElement(name);
+ if(!attribute.isEmpty()){
+ ProfilData.setAttribute("type", attribute );
+ }
+ QDomText newTitleText = domDocument.createTextNode(text);
+ ProfilData.appendChild(newTitleText);
+ profil->appendChild(ProfilData);
+}
+
+/** TestPrint
+ Prints all profiles, !!! only for testing purposes
+*/
+void ProfilesManager::TestPrint()
+{
+ //////qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << " test print in DB";
+ if(!domDocument.isNull()){
+ QDomElement root = domDocument.documentElement();
+ QDomElement first = root.firstChildElement();
+ QDomElement chield;
+ //list of all profile
+ while(!first.isNull()) {
+ //////qDebug() << "|Jmeno profilu" << first.tagName();
+ chield = first.firstChildElement();
+ while(!chield.isNull()){
+ //////qDebug() << "->>> atribut:"<< chield.tagName() << " hodnota: " << chield.text();
+ chield = chield.nextSiblingElement();
+ }
+ first = first.nextSiblingElement();
+ }
+ }
+}
+
+/** SetProfile(QString str_profile)
+ Sets profile
+*/
+void ProfilesManager::SetProfile(QString str_profile)
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Set profile into mobile-------------------" << str_profile;
+ Profil * profil = new Profil(str_profile);
+ if(!GetProfile(profil))
+ {
+ return;
+ }
+ profile_deamon->SetProfile(profil);
+ delete profil;
+}
+
+
+
--- /dev/null
+#ifndef PROFILESMANAGER_H
+#define PROFILESMANAGER_H
+
+#include <QObject>
+#include <QtCore/QFile>
+#include <QtXml/QDomDocument>
+#include <QtCore/QStringList>
+#include <QtCore/QDir>
+class ProfileDeamon;
+class Profil;
+class QStandardItemModel;
+class QFileInfo;
+class ProfilesManager : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ProfilesManager(QObject *parent = 0);
+
+ bool Init();
+
+ QStringList GetProfilesNames();
+ bool GetProfile(Profil * profil);
+ QStandardItemModel * GetModel();
+ bool CreateProfile(Profil *Data);
+ void UpdateProfile(Profil * Data );
+ void SetProfile(QString str_profile);
+ void DeleteProfile(QString profile_name);
+ void TestPrint();
+ QDomElement GetRootElement() const;
+ void SaveProfilesToXml();
+
+signals:
+ void s_profiles_name_change(QStringList Profiles_names);
+ void s_profile_update(QString Profil_name);
+ void s_profile_delete(QString profile_name);
+ void s_delete_Profiles_Name_From_Models(QString profile_name);
+
+public slots:
+
+private:
+ ProfileDeamon * profile_deamon;
+ QStandardItemModel *model_of_files;
+ QFile file;
+
+ QDomDocument domDocument;
+ bool InitFile();
+ bool CreateFile();
+ bool ReadFile();
+ bool CheckDomDoc();
+ QString CreateXmlText();
+ QDomElement CreateNewProfile( Profil *Data);
+ void CreateNode(QDomElement * profil, QString name, QString attribute, QString text);
+
+
+};
+
+#endif // PROFILESMANAGER_H
--- /dev/null
+<RCC>
+ <qresource prefix="/">
+ <file>translations/N9Profil_cs_CZ.qm</file>
+ </qresource>
+</RCC>
--- /dev/null
+#include "rulesmanager.h"
+#include <QtGui/QStandardItemModel>
+#include <QtCore/QDebug> //Debug pro informace
+RulesManager::RulesManager(QObject *parent) :
+ QObject(parent)
+{
+}
+
+/** Init
+ Creates an object ProfileDeamon and connects via ProfileDeamon: ConnectToDeamon
+ Create a model that will list all audio files
+ Then initializes the XML file using InitFile()
+ If the file exists so it attempts to read with readfile()
+ and if not it creates and initializes using CreateFile()
+*/
+bool RulesManager::Init()
+{//create a class to connect to deamon
+ InitWIFIIDModels();
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "bude init file ================= ";
+ //open the file
+ if(InitFile() == false) {
+ return false;
+ }
+
+ if(fileIDWifiNum.exists()) {
+ if(ReadfileIDWifiNum() == true){
+ LoadModelsWIFIIDTele();
+ return true;
+ } else {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "neco spatne ve sceni souborů================= ";
+ return false;
+ }
+ } else {
+ if(CreatefileIDWifiNum() == true){
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "file created";
+ return true;
+ } else {
+ return false;
+ }
+ }
+ return false;
+}
+
+/** InitWIFIIDModels().
+Used to initialize the models
+and Horizontal Header Labels
+*/
+bool RulesManager::InitWIFIIDModels()
+{
+ model_of_CellID = new QStandardItemModel(this);
+ model_of_WiFi = new QStandardItemModel(this);
+ model_of_telephone_num = new QStandardItemModel(this);
+
+ QStringList labels;
+ labels << tr("Name") << tr("Id location") << tr("Profile") ;
+ model_of_CellID->setHorizontalHeaderLabels(labels);
+
+ labels.clear();
+ labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ model_of_WiFi->setHorizontalHeaderLabels(labels);
+
+ labels.clear();
+ labels << tr("Name") << tr("Telephone") << tr("Profile");
+ model_of_telephone_num->setHorizontalHeaderLabels(labels);
+ return true;
+}
+
+//=============================================================
+/** InitFile
+Opens home folder and check if there is an dir NProfile and if not that it creates it
+and set the file to Dir.filePath(profiles.xml)
+*/
+bool RulesManager::InitFile()
+{
+ QDir Dir = QDir::homePath();
+ //vytvori slozku pokud neni
+ if(!Dir.exists("NProfile")){
+ if(!Dir.mkdir("NProfile")){
+ qWarning() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "Cannot create folder NProfile in home";
+ return false;
+ }
+ }
+ //switches to a folder
+ if(!Dir.cd("NProfile")){
+ qWarning() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "cannot cd in NProfile";
+ return false;
+ }
+ fileIDWifiNum.setFileName(Dir.filePath("cellidwifinum.xml")); //set
+ return true;
+}
+
+
+//=============================================================================================================
+/** CreatefileIDWifiNum
+Open the file and create XML using CreateXmlTextIDWifi () and write to a file.
+Sets the document and check with domDocumentIDWifiTelnum.setContent CheckDomDocIDWifi ()
+and closes the file.
+
+ QFile fileIDWifiNum;
+ QDomDocument domDocumentIDWifiTelnum;
+*/
+bool RulesManager::CreatefileIDWifiNum()
+{ //otevřu
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "vytvorim wifi soubor ================= ";
+ if (!fileIDWifiNum.open(QIODevice::ReadWrite | QIODevice::Text)){
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot open file";
+ return false;
+ }
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+ QTextStream out(&fileIDWifiNum);
+ QString text = CreateXmlTextIDWifi(); //create text xml
+ out.setCodec("UTF-8");//set utf 8
+ out.setAutoDetectUnicode(true);
+ out << text;//write
+ out.flush(); //
+
+ if (!domDocumentIDWifiTelnum.setContent(text, false, &errorStr, &errorLine,
+ &errorColumn)) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot set content " << errorStr << "line " << errorLine << "Column " << errorColumn;
+ fileIDWifiNum.close();
+ return false;
+ }
+ //check
+ if(!CheckDomDocIDWifi()) {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in document, this is not calendar file ";
+ fileIDWifiNum.close();
+ return false;
+ }
+ fileIDWifiNum.close();//close
+ initIDWIFTeleDoc(); //add elements
+
+ return true;
+}
+
+
+/** CreateXmlTextIDWifi
+Creates the xml text
+*/
+QString RulesManager::CreateXmlTextIDWifi()
+{
+ QString text("");
+ text += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ text += "<!DOCTYPE NProfIDWifi>\n";
+ text +="<NProfIDWifi version=\"1.0\">\n";//začátek
+ text += "</NProfIDWifi>\n";//konec souboru
+ return text;
+}
+
+/** initIDWIFTeleDoc
+Add chield element to doc
+*/
+void RulesManager::initIDWIFTeleDoc()
+{
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();
+ QDomElement Wifi = domDocumentIDWifiTelnum.createElement("WIFI");
+ root.appendChild(Wifi);
+ QDomElement LocID = domDocumentIDWifiTelnum.createElement("LOCID");
+ root.appendChild(LocID);
+ QDomElement Tele = domDocumentIDWifiTelnum.createElement("TELENUM");
+ root.appendChild(Tele);
+}
+//=============================================================================================================
+//=============================================================================================================
+/** ReadfileIDWifiNum
+Opens a file and reads the XML document using domDocumentIDWifiTelnum.setContent and check it with CheckDomDocIDWifi ()
+*/
+bool RulesManager::ReadfileIDWifiNum()
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nacitam wifi soubor ================= ";
+ if (!fileIDWifiNum.open(QIODevice::ReadWrite | QIODevice::Text)){
+ ////qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "Cannot open file";
+ return false;
+ }
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+ if (!domDocumentIDWifiTelnum.setContent((QIODevice * )&fileIDWifiNum, false, &errorStr, &errorLine,
+ &errorColumn)) {
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Cannot set content " << errorStr << "line " << errorLine << "Column " << errorColumn;
+ fileIDWifiNum.close();
+ return false;
+ }
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "tisk toho dokumentu" << domDocumentIDWifiTelnum.toString();
+ //control
+ if(!CheckDomDocIDWifi()) {
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in document, this is not calendar file ";
+ fileIDWifiNum.close();
+ return false;
+ }
+ // print();
+ fileIDWifiNum.close();
+ return true;
+}
+
+
+/** CheckDomDocIDWifi
+Checks if the document is in order
+*/
+bool RulesManager::CheckDomDocIDWifi()
+{
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();
+ if (root.tagName() != "NProfIDWifi") {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in root";
+ return false;
+ } else if (root.hasAttribute("version")
+ && root.attribute("version") != "1.0") {
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Error in version";
+ return false;
+ }
+ return true;
+}
+
+
+//===============================================================================================
+
+/** LoadModelsWIFIIDTele().
+Load rules for network and numbers from xml document into tables
+*/
+void RulesManager::LoadModelsWIFIIDTele()
+{
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "bude nacitat";
+ QList<QStandardItem *> items;
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();
+ QDomElement eleLocId = root.firstChildElement("LOCID");
+ QDomElement eleWifi = root.firstChildElement("WIFI");
+ QDomElement eleTelenum = root.firstChildElement("TELENUM");
+
+ QDomElement first = eleLocId.firstChildElement(); //ziskám první prvek
+ QDomElement second;
+ while(!first.isNull()) //pro vsechny pravidla
+ {
+ second = first.firstChildElement();
+ while(!second.isNull()) //pravidla maj 3 elementy
+ {
+ items.append(new QStandardItem(second.text())); //text je hodnota
+ second = second.nextSiblingElement();
+ }
+ model_of_CellID->appendRow(items);
+ items.clear();
+ ////qDebug() << "Element name and text: " << first.tagName() << first.text() << "a atribut je ???????" << first.attribute(QString("id"));
+ first = first.nextSiblingElement();
+ }
+
+ first = eleWifi.firstChildElement(); //ziskám první prvek
+
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nastavuje modely";
+ while(!first.isNull())
+ {
+ second = first.firstChildElement();
+ ////qDebug() << "Element name and text: " << first.tagName() << first.text() << "a atribut je ???????" << first.attribute(QString("id"));
+ while(!second.isNull()) //pravidla maj 3 elementy
+ {
+ items.append(new QStandardItem(second.text())); //text je hodnota
+ second = second.nextSiblingElement();
+ }
+ model_of_WiFi->appendRow(items);
+ items.clear();
+ first = first.nextSiblingElement();
+ }
+
+ first = eleTelenum.firstChildElement(); //ziskám první prvek
+
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nastavuje modely";
+ while(!first.isNull())
+ {
+ second = first.firstChildElement();
+ ////qDebug() << "Element name and text: " << first.tagName() << first.text() << "a atribut je ???????" << first.attribute(QString("id"));
+ while(!second.isNull()) //pravidla maj 3 elementy
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nastavuje modely a seckond je " << second.text();
+ items.append(new QStandardItem(second.text())); //text je hodnota
+ second = second.nextSiblingElement();
+ }
+ model_of_telephone_num->appendRow(items);
+ items.clear();
+ first = first.nextSiblingElement();
+ }
+}
+//===========================================
+/** SaveProfilesToXml
+Saves the document to a file
+*/
+void RulesManager::SaveProfilesToXml()
+{
+ //update before saving
+ UpdateWifiXml();
+ UpdateIDLocXml();
+ UpdateTelNumXml();
+
+ if (!fileIDWifiNum.open(QIODevice::WriteOnly | QIODevice::Text)){
+ //////qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "Cannot open file";
+ }
+
+ QTextStream outt(&fileIDWifiNum);
+ outt.setCodec("UTF-8");//set utf 8
+ outt.setAutoDetectUnicode(true);
+ outt << domDocumentIDWifiTelnum.toString();//write
+ outt.flush(); //
+ fileIDWifiNum.close();
+}
+
+/** UpdateIDLocXml
+ Update id loc part of xml document
+*/
+void RulesManager::UpdateIDLocXml()
+{
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();//zikam root elemnet
+ QDomElement profil_old = root.firstChildElement("LOCID");//najdu starej pro id mista
+ QDomElement profil_new = this->CreateNewIDEle("LOCID", model_of_CellID);//vytvorim novy z modelu
+ root.replaceChild(profil_new, profil_old); //vymenim
+ // emit s_profile_update(Data->GetName());
+}
+
+/** UpdateWifiXml
+ Update wifi part of xml document
+*/
+void RulesManager::UpdateWifiXml()
+{
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();//zikam root elemnet
+ QDomElement profil_old = root.firstChildElement("WIFI");//najdu starej pro id mista
+ QDomElement profil_new = this->CreateNewIDEle("WIFI", model_of_WiFi);//vytvorim novy z modelu
+ root.replaceChild(profil_new, profil_old); //vymenim
+ // emit s_profile_update(Data->GetName());
+}
+
+/** UpdateTelNumXml
+ Update tel part of xml document
+*/
+void RulesManager::UpdateTelNumXml()
+{
+ QDomElement root = domDocumentIDWifiTelnum.documentElement();//zikam root elemnet
+ QDomElement profil_old = root.firstChildElement("TELENUM");//najdu starej pro id mista
+ QDomElement profil_new = this->CreateNewIDEle("TELENUM", model_of_telephone_num);//vytvorim novy z modelu
+ root.replaceChild(profil_new, profil_old); //vymenim
+ // emit s_profile_update(Data->GetName());
+}
+
+/** CreateNewIDEle
+Save all records from table to xml and return element
+ \param model Pointer to model
+ \param name Name
+
+*/
+QDomElement RulesManager::CreateNewIDEle(QString name, QStandardItemModel * model)
+{
+ QDomElement rules = domDocumentIDWifiTelnum.createElement(name); //create element
+ QDomElement rule;
+ QString str;
+ for(int i = 0; i < model->rowCount(); i++)
+ {
+ rule = domDocumentIDWifiTelnum.createElement(QString("rule") + str.setNum(i));
+ CreateNodeID(&rule, QString("name"), model->item(i,0)->data(Qt::DisplayRole).toString());
+ CreateNodeID(&rule, QString("id"), model->item(i,1)->data(Qt::DisplayRole).toString());
+ CreateNodeID(&rule, QString("profile"), model->item(i,2)->data(Qt::DisplayRole).toString());
+ rules.appendChild(rule);
+ }
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ return rules;
+}
+
+/** createNode
+Creates an item in the XML file and adds it to the record
+ \param id Pointer to the element in xml
+ \param name Name
+ \param text wifi name or id location
+ \param attribute atribute for name of profile
+*/
+void RulesManager::CreateNodeID(QDomElement * rule, QString name, QString text)
+{
+ QDomElement ruleE = domDocumentIDWifiTelnum.createElement(name);
+ QDomText newTitleText = domDocumentIDWifiTelnum.createTextNode(text);
+ ruleE.appendChild(newTitleText);
+ rule->appendChild(ruleE);
+}
+
+//==================================================================================================
+/** deleteProfilesNamesFromModels
+Delete profile name in models
+ \param profile_name Profile name
+*/
+void RulesManager::deleteProfilesNamesFromModels(QString profile_name)
+{
+ QList<QStandardItem *> listitems;
+ listitems = model_of_CellID->findItems(profile_name, Qt::MatchExactly, 2);
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "budou se mazat jmena profilu";
+
+ foreach(QStandardItem * item, listitems )
+ {
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nasel v tabulce pro cell toto" << item->data(Qt::DisplayRole).toString();
+ item->setData(QVariant(""),Qt::DisplayRole);
+ }
+ listitems.clear();
+
+ listitems = model_of_WiFi->findItems(profile_name, Qt::MatchExactly, 2);
+ foreach(QStandardItem * item, listitems )
+ {
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nasel v tabulce pro cell toto" << item->data(Qt::DisplayRole).toString();
+ item->setData(QVariant(""),Qt::DisplayRole);
+ }
+ listitems.clear();
+
+ listitems = model_of_telephone_num->findItems(profile_name, Qt::MatchExactly, 2);
+ foreach(QStandardItem * item, listitems )
+ {
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nasel v tabulce pro cell toto" << item->data(Qt::DisplayRole).toString();
+ item->setData(QVariant(""),Qt::DisplayRole);
+ }
+}
+
+/** GetCellIDModel
+ Return pointer to model
+*/
+QStandardItemModel * RulesManager::GetCellIDModel()
+{
+ return model_of_CellID;
+}
+
+/** GetWiFiModel
+ Return pointer to model
+*/
+QStandardItemModel * RulesManager::GetWiFiModel()
+{
+ return model_of_WiFi;
+}
+
+/** GetWiFiModel
+ Return pointer to model
+*/
+QStandardItemModel * RulesManager::GetTelNumModel()
+{
+ return model_of_telephone_num;
+}
+
--- /dev/null
+#ifndef RULESMANAGER_H
+#define RULESMANAGER_H
+
+#include <QObject>
+#include <QtCore/QFile>
+#include <QtXml/QDomDocument>
+#include <QtCore/QStringList>
+#include <QtCore/QDir>
+class QStandardItemModel;
+class RulesManager : public QObject
+{
+ Q_OBJECT
+public:
+ explicit RulesManager(QObject *parent = 0);
+ bool Init();
+
+ QStandardItemModel * GetCellIDModel();
+ QStandardItemModel * GetWiFiModel();
+ QStandardItemModel * GetTelNumModel();
+
+void SaveProfilesToXml();
+
+signals:
+
+public slots:
+ void deleteProfilesNamesFromModels(QString profile_name);
+private:
+ bool InitFile();
+ bool CreateFile();
+ bool ReadFile();
+
+
+ QFile fileIDWifiNum;
+ QDomDocument domDocumentIDWifiTelnum;
+ bool InitWIFIIDModels();
+ bool CreatefileIDWifiNum();
+ bool ReadfileIDWifiNum();
+ QString CreateXmlTextIDWifi();
+ bool CheckDomDocIDWifi();
+ void initIDWIFTeleDoc();
+
+
+ QStandardItemModel *model_of_CellID;
+ QStandardItemModel *model_of_WiFi;
+ QStandardItemModel *model_of_telephone_num;
+
+ void UpdateWifiXml();
+ void UpdateIDLocXml();
+ void UpdateTelNumXml();
+ QDomElement CreateNewIDEle(QString name, QStandardItemModel * model);
+ void CreateNodeID(QDomElement * , QString , QString );
+
+
+ void LoadModelsWIFIIDTele();
+
+};
+
+#endif // RULESMANAGER_H
--- /dev/null
+#include "soundfilesmanager.h"
+#include <QtGui/QStandardItemModel>
+#include <QtCore/QStringList>
+#include <QtCore/QDir>
+#include <QtXml/QDomElement>
+#include <QtCore/QDebug> //Debug pro informace
+SoundFilesManager::SoundFilesManager(QObject *parent) :
+ QObject(parent)
+{
+}
+
+bool SoundFilesManager::Init(QDomElement root)
+{
+ if(InitModel() == false)
+ return false;
+
+ filesFromXmlDB(root);
+ return true;
+}
+
+
+/** InitModel().
+Used to initialize the model for store names and paths to music files.
+*/
+bool SoundFilesManager::InitModel()
+{
+ model_of_files = new QStandardItemModel(this);
+ //QDir dir("/usr/share/sounds");
+ QDir dir("/home/user/MyDocs/.sounds/Ringtones");
+ QFileInfoList list_of_in_home = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
+ QFileInfoList list_of_maemo_sounds = QFileInfoList();
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " budou se pridavat soubory" ;
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/NokiaTune.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Beeb.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Emailalert1.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Emailalert2.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Message1.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Message2.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Message3.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Message4.aac"));
+ appendFile(&list_of_maemo_sounds,QFileInfo("/usr/share/sounds/Message5.aac"));
+
+ list_of_maemo_sounds += list_of_in_home;
+ appendToModel(&list_of_maemo_sounds);
+ return true;
+}
+
+/** appendToModel().
+append item into model of files
+*/
+void SoundFilesManager::appendToModel(QFileInfoList * list_of_files)
+{
+ QList<QStandardItem *> items;
+ foreach(QFileInfo file, *list_of_files)
+ {
+ if(checkFileInModelAndExist(file)){
+ //////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " bude se pridavat do modelu toto" << file.absoluteFilePath();
+ items.append(new QStandardItem(file.fileName()));
+ items.append(new QStandardItem(file.absoluteFilePath()));
+ model_of_files->appendRow(items);
+ items.clear();
+ }
+ }
+}
+
+/** appendFile().
+append item into list of files
+*/
+void SoundFilesManager::appendFile(QFileInfoList * list_of_files, QFileInfo inf)
+{
+ if(inf.exists()) list_of_files->append(inf);
+}
+
+/** checkFileInModelAndExist().
+Check if file exist and if is its in model
+*/
+bool SoundFilesManager::checkFileInModelAndExist(QFileInfo inf)
+{
+ if(!inf.exists()) return false;
+ if(!model_of_files->findItems(inf.absoluteFilePath(),Qt::MatchExactly, 1).empty()) return false;
+ return true;
+}
+
+/** filesFromXmlDB().
+Load files from xml
+*/
+void SoundFilesManager::filesFromXmlDB(QDomElement root)
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "ted z xml";
+ QFileInfoList list_of_files;
+ QDomElement first = root.firstChildElement();
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "sml neni nulll";
+ //list of all profile
+ while(!first.isNull()) {
+ qDebug() << "|Jmeno profilu" << first.tagName();
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "bude se pridavat z xml" << first.firstChildElement("email.alert.tone").tagName();
+ appendFile(&list_of_files, QFileInfo(first.firstChildElement("email.alert.tone").text()));
+ appendFile(&list_of_files, QFileInfo(first.firstChildElement("im.alert.tone").text()));
+ appendFile(&list_of_files, QFileInfo(first.firstChildElement("ringing.alert.tone").text()));
+ appendFile(&list_of_files, QFileInfo(first.firstChildElement("sms.alert.tone").text()));
+ first = first.nextSiblingElement();
+ }
+ appendToModel(&list_of_files);
+}
+
+/** GetModel().
+Returns a reference to the model of music files.
+*/
+QStandardItemModel * SoundFilesManager::GetModel()
+{
+ return model_of_files;
+}
--- /dev/null
+#ifndef SOUNDFILESMANAGER_H
+#define SOUNDFILESMANAGER_H
+
+#include <QObject>
+ #include <QFileInfo>
+class QStandardItemModel;
+class QDomElement;
+class SoundFilesManager : public QObject
+{
+ Q_OBJECT
+public:
+ explicit SoundFilesManager(QObject *parent = 0);
+ bool Init(QDomElement);
+ QStandardItemModel * GetModel();
+
+signals:
+
+public slots:
+
+private:
+ QStandardItemModel *model_of_files;
+ bool InitModel();
+ void appendFile(QFileInfoList * list_of_files, QFileInfo inf);
+ bool checkFileInModelAndExist(QFileInfo inf);
+ void appendToModel(QFileInfoList * list_of_files);
+ void filesFromXmlDB(QDomElement);
+
+};
+
+#endif // SOUNDFILESMANAGER_H
--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-02-17T11:50:47
+# -------------------------------------------------
+# Obsahuje Qt >= 4.6.* ?
+contains(QT_VERSION, ^4\.[0-6]\.*) {
+ message("Use new version of QT, you are using: $$QT_VERSION .")
+ error("Use Qt 4.6.*")
+}
+
+ unix {
+ #VARIABLES
+ isEmpty(PREFIX) {
+ PREFIX = /usr
+ }
+
+
+# potřebuji přidat maemo5
+QT += xml xmlpatterns dbus maemo5 network
+
+# ted bude debug a potřebuji ještě pkgconfig
+# http://doc.trolltech.com/4.6/qmake-project-files.html#configuration-features
+CONFIG += debug link_pkgconfig qt mobility
+
+MOBILITY += systeminfo
+# pro d-bus v libprofile
+PKGCONFIG += dbus-1
+
+# include pro libprofile.h and cal backend
+INCLUDEPATH += /usr/include/profiled \
+ /usr/include/calendar-backend
+
+# lib libprofile
+LIBS += /usr/lib/libprofile.so \
+ -lcalendar_backend
+
+TARGET = N9Profil
+TEMPLATE = app
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ controlclass.cpp \
+ profil.cpp \
+ profiledb.cpp \
+ profiledeamon.cpp \
+ profildialog.cpp \
+ timeprofile.cpp \
+ timedprofildialog.cpp \
+ calendatprofile.cpp \
+ calendar.cpp \
+ event.cpp \
+ calendarprofilesdialog.cpp \
+ calendarsetprofiledialog.cpp \
+ networkdialogdialog.cpp \
+ networkprofile.cpp \
+ networkdialogedit.cpp \
+ telephonenumprofile.cpp \
+ telenumdialog.cpp \
+ telephonenumnewruledialog.cpp \
+ profilesmanager.cpp \
+ soundfilesmanager.cpp \
+ rulesmanager.cpp
+HEADERS += mainwindow.h \
+ controlclass.h \
+ profil.h \
+ profiledb.h \
+ profiledeamon.h \
+ profildialog.h \
+ timeprofile.h \
+ timedprofildialog.h \
+ calendatprofile.h \
+ calendar.h \
+ event.h \
+ calendarprofilesdialog.h \
+ calendarsetprofiledialog.h \
+ networkdialogdialog.h \
+ networkprofile.h \
+ networkdialogedit.h \
+ telephonenumprofile.h \
+ telenumdialog.h \
+ telephonenumnewruledialog.h \
+ profilesmanager.h \
+ soundfilesmanager.h \
+ rulesmanager.h
+FORMS += mainwindow.ui \
+ profildialog.ui \
+ timedprofildialog.ui \
+ calendarprofilesdialog.ui \
+ calendarsetprofiledialog.ui \
+ networkdialogdialog.ui \
+ networkdialogedit.ui \
+ telenumdialog.ui \
+ telephonenumnewruledialog.ui
+
+
+# čeština a nastavení na UTF-8
+TRANSLATIONS = N9Profil_cs_CZ.ts
+CODECFORTR = UTF-8
+RESOURCES += rcc.qrc
+
+BINDIR = $$PREFIX/bin
+DATADIR =$$PREFIX/share
+
+DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
+
+#MAKE INSTALL
+
+INSTALLS += target desktop iconxpm icon26 icon40 icon64 service
+
+ target.path =$$BINDIR
+
+ desktop.path = $$DATADIR/applications/hildon
+ desktop.files += data/$${TARGET}.desktop
+
+ iconxpm.path = $$DATADIR/pixmap
+ iconxpm.files += data/maemo/$${TARGET}.xpm
+
+ icon26.path = $$DATADIR/icons/hicolor/26x26/apps
+ icon26.files += data/26x26/$${TARGET}.png
+
+ icon40.path = $$DATADIR/icons/hicolor/40x40/apps
+ icon40.files += data/40x40/$${TARGET}.png
+
+ icon64.path = $$DATADIR/icons/hicolor/64x64/apps
+ icon64.files += data/64x64/$${TARGET}.png
+
+ service.path = $$DATADIR/dbus-1/services
+ service.files += data/org.indt.N9Profil.service
+}
--- /dev/null
+#include "telenumdialog.h"
+#include "telephonenumnewruledialog.h"
+#include "ui_telenumdialog.h"
+#include <QStringList>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QItemSelectionModel>
+#include <QtGui/QStandardItemModel>
+
+#include <QtGui/QMessageBox>
+TeleNumDialog::TeleNumDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::TeleNumDialog)
+{
+ ui->setupUi(this);
+}
+
+TeleNumDialog::~TeleNumDialog()
+{
+ delete ui;
+}
+
+void TeleNumDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/** SetViews.
+Set view models, behavior, mode and triggerrs
+\param model_of_Telnum model of profiles
+\param selModel_Telnum selection model for profiles
+*/
+void TeleNumDialog::SetViews(QStandardItemModel *model_of_Telnum ,
+ QItemSelectionModel *selModel_Telnum)
+{
+ ui->tableView->setModel(model_of_Telnum);
+ ui->tableView->setSelectionModel(selModel_Telnum);
+ ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ ui->tableView->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ //ui->tableView_2->resizeColumnsToContents();
+ ui->tableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+}
+
+/** SetProfilenames.
+Set profiles names
+\param list_of_profiles_nf names of profiles
+*/
+void TeleNumDialog::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+}
+
+/** createNewRule()
+Create new rule for location or wifi
+*/
+void TeleNumDialog::createNewRule()
+{
+
+QStandardItemModel *model;
+QList<QStandardItem *> listitems;
+
+TelePhoneNumNewRuleDialog dialog(this);
+ model = (QStandardItemModel *) ui->tableView->model();//model je ted id loc
+
+ dialog.SetNameOfLabel("", QString(tr("New telephone rule")));
+
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ dialog.SetModel(model);
+ int result = dialog.exec();
+ if(result)
+ {
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "Nove providloooooooooo";
+ //nove jmeno pro pravidlo
+ listitems.append(new QStandardItem(dialog.GetNameOfRule()));//jmeno pravidla
+ listitems.append(new QStandardItem(dialog.GetTelNum()));//tel cislo
+ listitems.append(new QStandardItem(dialog.GetNameProfile()));//jmeno profilu
+ model->appendRow(listitems);
+ // emit s_change_model();//vyslu zmenu
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ }
+}
+
+/** on_pushButton_clicked()
+Slot for button click
+*/
+void TeleNumDialog::on_pushButton_clicked()
+{
+createNewRule();
+}
+
+/** on_tableView_clicked()
+Slot for click on table
+*/
+void TeleNumDialog::on_tableView_clicked(QModelIndex index)
+{
+ Q_UNUSED(index)
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "kliknutu na idloc";
+
+ QItemSelectionModel *selModel = ui->tableView->selectionModel();
+ if(!selModel->hasSelection()) return;//no selection retirn
+ QModelIndexList list_of_selected = selModel->selectedIndexes(); //get selected
+ QStandardItemModel *model = (QStandardItemModel *) ui->tableView->model(); //model
+ int row = list_of_selected.at(0).row();//get row
+
+ QMessageBox msgBox;
+ msgBox.setIcon(QMessageBox::Information);
+ msgBox.setText(tr("Delete or modify number?"));
+ msgBox.setEscapeButton(QMessageBox::Cancel);
+ QPushButton *CancelButton = msgBox.addButton(QMessageBox::Cancel);
+ QPushButton *DeleteButton = msgBox.addButton(tr("Delete"), QMessageBox::ActionRole);
+ QPushButton *modifyButton = msgBox.addButton(tr("Modify"),QMessageBox::DestructiveRole);
+
+ msgBox.exec(); //delete or modifi
+ if (msgBox.clickedButton() == DeleteButton) {
+
+ //qDebug() << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << "bude se mazat pravidlo";
+ model->removeRow(row);
+ selModel->clearSelection();
+ // emit s_change_model(); //vyslu zmenu
+ }else if (msgBox.clickedButton() == modifyButton) {
+ TelePhoneNumNewRuleDialog dialog(this); //modifi
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");davam tam id lokace prvna
+ dialog.SetNameOfLabel(list_of_selected.at(1).data().toString(), QString(tr("Change profile for number: ")));
+ dialog.SetProfilenames(list_of_profiles); //dam tomu seznan pro výběr
+ dialog.SetNameOfRule(list_of_selected.at(0).data().toString()); //dam tomu jmeno pravidla
+ dialog.SetTelNum(list_of_selected.at(1).data().toString());
+ int result = dialog.exec();
+ if(result)
+ {
+ //nove jmeno pro pravidlo
+ model->item(list_of_selected.at(0).row(),list_of_selected.at(0).column())->setData(QVariant(dialog.GetNameOfRule()),Qt::DisplayRole);
+ //new name
+ model->item(list_of_selected.at(2).row(),list_of_selected.at(2).column())->setData(QVariant(dialog.GetNameProfile()),Qt::DisplayRole);
+ // emit s_change_model(); //vyslu zmenu
+ }
+ selModel->clearSelection();
+ }else if (msgBox.clickedButton() == CancelButton) {
+ selModel->clearSelection();
+ return;
+ }
+}
--- /dev/null
+#ifndef TELENUMDIALOG_H
+#define TELENUMDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class TeleNumDialog;
+}
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QSettings;
+class QMaemo5ValueButton;
+class QStringList;
+class QModelIndex;
+class QListView;
+class QMaemo5ListPickSelector;
+
+/** \class TeleNumDialog
+ \brief class for dialog telephone rules
+ */
+class TeleNumDialog : public QDialog {
+ Q_OBJECT
+public:
+ TeleNumDialog(QWidget *parent = 0);
+ ~TeleNumDialog();
+ void SetViews(QStandardItemModel *model_of_Telnum ,
+ QItemSelectionModel *selModel_Telnum);
+
+ void SetProfilenames(QStringList list_of_profiles_nf);
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::TeleNumDialog *ui;
+ QStringList list_of_profiles;
+
+
+private slots:
+ void on_tableView_clicked(QModelIndex index);
+ void on_pushButton_clicked();
+ void createNewRule();
+};
+
+#endif // TELENUMDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TeleNumDialog</class>
+ <widget class="QDialog" name="TeleNumDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>New telephone number rule</string>
+ </property>
+ <widget class="QTableView" name="tableView">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>781</width>
+ <height>251</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>270</y>
+ <width>581</width>
+ <height>71</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Add new telephone number</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "telephonenumnewruledialog.h"
+#include "ui_telephonenumnewruledialog.h"
+#include <QStringList>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QItemSelectionModel>
+#include <QtGui/QStandardItemModel>
+#include <QMaemo5InformationBox>
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+TelePhoneNumNewRuleDialog::TelePhoneNumNewRuleDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::TelePhoneNumNewRuleDialog)
+{
+ ui->setupUi(this);
+ selectedProfile = QString("");
+ ui->lineEditTelNumber->setText(QString("+420"));
+}
+
+TelePhoneNumNewRuleDialog::~TelePhoneNumNewRuleDialog()
+{
+ delete ui;
+}
+
+
+/** SetProfilenames.
+ Store profile names and create maemo button fro show this names
+ \param list_of_profiles_nf list of profile names
+*/
+void TelePhoneNumNewRuleDialog::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+
+ p_model_profile_names = new QStandardItemModel(this);//model for maemo 5 button
+
+ foreach(QString profile, list_of_profiles )
+ {
+ p_model_profile_names->appendRow(new QStandardItem(profile));
+ }
+
+ p_set_Profile_button = new QMaemo5ValueButton(tr("Choose profile for Number:"), this);
+ p_set_Profile_button->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ p_list_pick_profile = new QMaemo5ListPickSelector();
+ p_list_pick_profile->setModel(p_model_profile_names);
+ p_set_Profile_button->setPickSelector(p_list_pick_profile);
+ ui->formLayout_2->addWidget(p_set_Profile_button);
+
+ connect(p_list_pick_profile,SIGNAL(selected(QString)),this,SLOT(SelectedName(QString)));
+}
+
+/** SetModel.
+set model for dialog
+\param model model
+*/
+void TelePhoneNumNewRuleDialog::SetModel(QStandardItemModel *model)
+{
+ model_of_Telnum = model;
+}
+
+
+/** TelePhoneNumNewRuleDialog.
+number in table
+\param Tel tel number
+*/
+bool TelePhoneNumNewRuleDialog::FindTelModel(QString Tel)
+{
+ QList<QStandardItem *> list_of_num;
+
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+ //qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "pocet radku v modelu wifi " << model_of_WifiIf->rowCount();
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_num = model_of_Telnum->findItems(Tel, Qt::MatchExactly , 1); //fing num name in 1 colum
+ return list_of_num.empty();
+
+}
+
+
+/** SelectedName.
+ Slot for change in list pick
+ \param name name of profile
+*/
+void TelePhoneNumNewRuleDialog::SelectedName(QString name)
+{
+ selectedProfile = name;
+}
+
+/** SetNameOfLabel.
+Set text for label
+ \param id name of network
+ \param name text for label
+*/
+void TelePhoneNumNewRuleDialog::SetNameOfLabel(QString id, QString name )
+{
+ ui->labelText->setText(name + id);
+}
+
+/** GetNameProfile.
+Return name of selected profile
+*/
+QString TelePhoneNumNewRuleDialog::GetNameProfile()
+{
+ return selectedProfile;
+}
+
+/** GetNameOfRule.
+Return nameo of rule
+*/
+QString TelePhoneNumNewRuleDialog::GetNameOfRule()
+{
+ return ui->lineEditName->text();
+}
+
+/** GetNameOfRule.
+Return nameo of rule
+*/
+QString TelePhoneNumNewRuleDialog::GetTelNum()
+{
+ return ui->lineEditTelNumber->text();
+}
+
+/** GetNameOfRule.
+Return nameo of rule
+*/
+void TelePhoneNumNewRuleDialog::SetTelNum(QString str)
+{
+ ui->lineEditTelNumber->setText(str);
+}
+
+/** SetNameOfLabel.
+set namo of rule
+ \param name text for label
+*/
+void TelePhoneNumNewRuleDialog::SetNameOfRule(QString name)
+{
+ ui->lineEditName->setText(name);
+}
+
+/** accept()
+Slot for signal when user click on save button.
+Check is everyting is OK
+*/
+void TelePhoneNumNewRuleDialog::accept()
+{
+ if(selectedProfile.isEmpty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select profile for number"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if(ui->lineEditName->text().isEmpty())
+ {
+ QMaemo5InformationBox::information(this, tr("Please fill name"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if(ui->lineEditTelNumber->text().split(QRegExp("\\s+"),QString::SkipEmptyParts).size() > 1)
+ {
+ QMaemo5InformationBox::information(this, tr("One number please"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ if((ui->lineEditTelNumber->text().length() == 13))
+ {
+
+ QString str = ui->lineEditTelNumber->text();
+ if(str.contains(QRegExp("[+]\\d{12}")))
+ {
+ if(FindTelModel(str)){
+ done(QDialog::Accepted);
+ }else {
+ QMaemo5InformationBox::information(this, tr("This rule for number already exists"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+ } else {
+ QMaemo5InformationBox::information(this, tr("Set number in format : +XXXXXXXXXXXX"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+ }else {
+ QMaemo5InformationBox::information(this, tr("Set number in format : +XXXXXXXXXXXX"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+}
+
+void TelePhoneNumNewRuleDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
--- /dev/null
+#ifndef TELEPHONENUMNEWRULEDIALOG_H
+#define TELEPHONENUMNEWRULEDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class TelePhoneNumNewRuleDialog;
+}
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QSettings;
+class QMaemo5ValueButton;
+class QStringList;
+class QModelIndex;
+class QListView;
+class QMaemo5ListPickSelector;
+
+/** \class TelePhoneNumNewRuleDialog
+ \brief class for dialog to create telephone rules
+ */
+class TelePhoneNumNewRuleDialog : public QDialog {
+ Q_OBJECT
+public:
+ TelePhoneNumNewRuleDialog(QWidget *parent = 0);
+ ~TelePhoneNumNewRuleDialog();
+ void SetProfilenames(QStringList list_of_profiles_nf);
+ void SetNameOfLabel(QString id, QString name );
+ void SetTelNum(QString str);
+ QString GetNameProfile();
+ QString GetNameOfRule();
+ QString GetTelNum();
+ void SetNameOfRule(QString name);
+ void SetModel(QStandardItemModel *model);
+protected:
+ void changeEvent(QEvent *e);
+ void accept();
+
+private:
+ Ui::TelePhoneNumNewRuleDialog *ui;
+
+ QMaemo5ValueButton *p_set_Profile_button;
+ QMaemo5ListPickSelector *p_list_pick_profile;
+ QStandardItemModel *p_model_profile_names;
+
+ QStandardItemModel *model_of_Telnum;
+
+ QString selectedProfile;
+ QStringList list_of_profiles;
+
+ QString name_of_rule;
+
+ bool FindTelModel(QString Tel);
+
+private slots:
+ void SelectedName(QString name);
+};
+
+#endif // TELEPHONENUMNEWRULEDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TelePhoneNumNewRuleDialog</class>
+ <widget class="QDialog" name="TelePhoneNumNewRuleDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>232</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>17</pointsize>
+ </font>
+ </property>
+ <property name="windowTitle">
+ <string>Rule for number</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="labelText">
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Telephone Number</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="lineEditName"/>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="lineEditTelNumber"/>
+ </item>
+ <item row="4" column="0" colspan="2">
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>pushButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TelePhoneNumNewRuleDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>334</x>
+ <y>142</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>281</x>
+ <y>176</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+#include "telephonenumprofile.h"
+#include "telenumdialog.h"
+#include <QStringList>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtGui/QStandardItemModel>
+#include <QtGui/QItemSelectionModel>
+#include <QtDBus/QDBusConnection>
+#include <QDBusMessage>
+#include <QtCore/QTimer>
+#include <QDBusInterface>
+static const char* CALL_DBUS_SERVICE = "com.nokia.csd.Call";
+static const char* CALL_DBUS_OBJECT_PATH = "/com/nokia/csd/call/1";
+static const char* CALL_DBUS_INTERFACE = "com.nokia.csd.Call.Instance";
+static const char* CALL_DBUS_METHOD = "GetStatus";
+
+TelephoneNumProfile::TelephoneNumProfile(QWidget *parent) :
+ QWidget(parent)
+{
+ //======================================================
+ timer = new QTimer(this);
+ timer->setSingleShot(true);//A single-shot timer fires only once
+ connect(timer,SIGNAL(timeout()),this,SLOT(TimerTimeout()));
+ bool succ = QDBusConnection::systemBus().connect( "", "/com/nokia/csd/call", "com.nokia.csd.Call", "Coming", this, SLOT(receiveCall(const QDBusMessage&)));;
+
+ if(succ){
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "anooooooooooooooooooooooooooooooooooooooo:";
+ } else {
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "neeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:";
+ }
+}
+
+/** receiveCall.
+Slot for dbus signal for incoming call
+\param msg msg from d bus
+*/
+void TelephoneNumProfile::receiveCall( const QDBusMessage& msg)
+{
+ // profile_set_value_as_bool("general", "vibrating.alert.enabled", false);
+ //profile_set_value("general", "ringing.alert.type", "silent");
+ // QList<QVariant> lst = msg.arguments();
+ // QVariant var;
+ // foreach(var, lst)
+ // {
+ // //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "příchozí hovor" << var.toString();
+ // }
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "příchozí hovor";
+ QString profil_name = FindTelnumInModel(msg.arguments().at(1).toString());
+ if(!profil_name.isEmpty()){
+ emit s_telnum_profile(profil_name);
+ timer->start(1000);
+ }
+}
+
+/** TimerTimeout()
+timer timeout slot
+*/
+void TelephoneNumProfile::TimerTimeout()
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "timer timeout" ;
+
+ QDBusConnection systemDbusConnection = QDBusConnection::systemBus();
+ QDBusInterface connectionInterface(CALL_DBUS_SERVICE,
+ CALL_DBUS_OBJECT_PATH,
+ CALL_DBUS_INTERFACE,
+ systemDbusConnection);
+ if (!connectionInterface.isValid()) {
+ qWarning() << "Cannotct conect to D-BUS";
+ return;
+ }
+ //poslu zpravu ze chcu info
+ QDBusMessage reply = connectionInterface.call(QLatin1String(CALL_DBUS_METHOD));
+ if (reply.type() == QDBusMessage::ReplyMessage) {
+ QList<QVariant> argList = reply.arguments();
+ // currentCellNetworkStatus = argList.at(INDEX_OF_NEVIM).toInt();
+ foreach(QVariant var, argList)
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " hodnota :::" << var.toString();
+ }
+ if(reply.arguments().at(0).toString() != "0")
+ {
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "nebyl nula" ;
+ timer->start(2000);
+ return;
+ }
+ else{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "ted jo" ;
+ emit s_telnum_profile(QString(""));//send empty string
+ }
+ }
+ else
+ {
+ qWarning() << reply.errorMessage();
+ }
+}
+
+/** SetProfilenames.
+Set profiles names
+\param list_of_profiles_nf names of profiles
+*/
+void TelephoneNumProfile::SetProfilenames(QStringList list_of_profiles_nf)
+{
+ list_of_profiles = list_of_profiles_nf;
+}
+
+/** createModels
+gets model and create selection model
+*/
+void TelephoneNumProfile::createModels(QStandardItemModel * telenum)
+{
+ model_of_telenum = telenum;
+ selModel_telenum = new QItemSelectionModel(model_of_telenum);
+}
+
+/** FindIDLocInModel.
+Find id location and return name of profile
+\param telnum tele num
+*/
+QString TelephoneNumProfile::FindTelnumInModel(QString telnum)
+{
+ QString name = QString("");
+ QList<QStandardItem *> list_of_telnum;
+
+ ////qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Bude hledat modelu wifi site " ;
+
+ //labels << tr("Name") << tr("Wifi name") << tr("Profile");
+ list_of_telnum = model_of_telenum->findItems(telnum, Qt::MatchExactly , 1);
+
+ if(list_of_telnum.empty())
+ {
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nic nanasel " ;
+ return name;
+ } else
+ {
+ name = model_of_telenum->item(list_of_telnum.at(0)->row(),2)->data(Qt::DisplayRole).toString();
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "nasel ho " << name;
+ return name;
+ }
+}
+
+
+//===========================================================================
+/** ShowDialog
+For dialog for modifi calendars and profiles
+*/
+void TelephoneNumProfile::ShowDialog()
+{
+ TeleNumDialog dialog(this);
+ dialog.SetViews(model_of_telenum,selModel_telenum);
+ dialog.SetProfilenames(list_of_profiles);
+
+ dialog.exec();
+}
+
--- /dev/null
+#ifndef TELEPHONENUMPROFILE_H
+#define TELEPHONENUMPROFILE_H
+
+#include <QWidget>
+class QDBusMessage;
+class QStandardItemModel;
+class QModelIndex;
+class QItemSelectionModel;
+class QTimer;
+
+/** \class TelephoneNumProfile
+ \brief class for setting profile based on telephone rules
+ */
+class TelephoneNumProfile : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit TelephoneNumProfile(QWidget *parent = 0);
+ void ShowDialog();
+ void createModels(QStandardItemModel * telenum);
+signals:
+ void s_telnum_profile(QString);
+
+private:
+ QTimer *timer;
+ QString FindTelnumInModel(QString telnum);
+
+
+
+ QStandardItemModel *model_of_telenum;
+ QItemSelectionModel *selModel_telenum;
+
+ QStringList list_of_profiles;
+public slots:
+ void SetProfilenames(QStringList list_of_profiles_nf);
+private slots:
+ void receiveCall (const QDBusMessage&);
+ void TimerTimeout();
+
+};
+
+#endif // TELEPHONENUMPROFILE_H
+
--- /dev/null
+#include "timedprofildialog.h"
+#include "ui_timedprofildialog.h"
+#include <QMaemo5ValueButton>
+#include <QMaemo5ListPickSelector>
+#include <QMaemo5InformationBox>
+#include <QMaemo5TimePickSelector>
+#include <QtCore/QStringList>
+
+#include <QtGui/QStandardItemModel>
+#include <QLabel>
+#include <QtCore/QDebug> //Debug pro informace
+TimedProfilDialog::TimedProfilDialog(QStringList list,QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::TimedprofilDialog)
+{
+ ui->setupUi(this);
+
+ createNewMaemoButtons(list);
+ createNewLabels();
+}
+
+/** createNewMaemoButtons()
+create maemo buttons
+*/
+void TimedProfilDialog::createNewMaemoButtons(QStringList list)
+{
+ QStandardItemModel *testmodel = new QStandardItemModel(this);
+ for (int i = 0; i < list.size(); ++i)
+ testmodel->appendRow(new QStandardItem(list.at(i)));
+
+ v1 = new QMaemo5ValueButton(tr("Name of profile"), this);
+ v1->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ list_pick = new QMaemo5ListPickSelector();
+ list_pick->setModel(testmodel);
+ v1->setPickSelector(list_pick);
+ ui->gridLayout->addWidget(v1,0,1);
+
+ v2 = new QMaemo5ValueButton(tr("Time"),this);
+ v2->setValueLayout(QMaemo5ValueButton::ValueBesideText);
+ time_pick = new QMaemo5TimePickSelector();
+ time_pick->setCurrentTime(QTime(0,0));//0 hours, 0 min
+ v2->setPickSelector(time_pick);
+ ui->gridLayout->addWidget(v2,1,1);
+}
+
+/** createNewLabels()
+create new labels
+*/
+void TimedProfilDialog::createNewLabels()
+{
+ QLabel * label_name = new QLabel(this);
+ label_name->setObjectName(QString::fromUtf8("label_name"));
+ QFont font;
+ font.setPointSize(17);
+ label_name->setFont(font);
+ label_name->setText(tr("Name of profile"));
+ ui->gridLayout->addWidget(label_name, 0, 0);
+ QLabel *label_time = new QLabel(this);
+ label_time->setObjectName(QString::fromUtf8("label_time"));
+ label_time->setFont(font);
+ label_time->setText(tr("Select time"));
+ ui->gridLayout->addWidget(label_time, 1, 0);
+}
+
+
+TimedProfilDialog::~TimedProfilDialog()
+{
+ delete ui;
+}
+
+/** accept()
+Slot for signal when user click on save button.
+Check is everyting is OK
+*/
+void TimedProfilDialog::accept()
+{
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " Profile is:" << list_pick->currentValueText();
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << " Time is : " << time_pick->currentValueText();
+ time_for_set = time_pick->currentTime();
+
+ name_of_profile = list_pick->currentValueText();
+ if(name_of_profile.isEmpty())
+ {
+ QMaemo5InformationBox::information(this, tr("Select profile"), QMaemo5InformationBox::DefaultTimeout);
+ return;
+ }
+
+ QTime nula_cas(0,0);
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "Hours: " << time_for_set.hour() << "min " << time_for_set.minute();
+ qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "sec to" << nula_cas.secsTo(time_for_set);
+ done(QDialog::Accepted);
+}
+
+/** GetTime()
+Return time from time picker
+*/
+QTime TimedProfilDialog::GetTime()
+{
+ return time_for_set;
+}
+
+/** GetName()
+Return name from list picker
+*/
+QString TimedProfilDialog::GetName()
+{
+ return name_of_profile;
+}
+
+void TimedProfilDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
--- /dev/null
+#ifndef TIMEDPROFILDIALOG_H
+#define TIMEDPROFILDIALOG_H
+
+/*! \file timedprofildialog.h
+ \brief File .H for class TimedProfilDialog
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+Header file
+*/
+#include <QDialog>
+class QStringList;
+class QMaemo5ListPickSelector;
+class QMaemo5ValueButton;
+class QMaemo5TimePickSelector;
+#include <QtCore/QTime>
+namespace Ui {
+ class TimedprofilDialog;
+}
+
+/** \class TimedProfilDialog
+ \brief class for dialog for timed profiles
+ */
+class TimedProfilDialog : public QDialog {
+ Q_OBJECT
+public:
+ TimedProfilDialog(QStringList list, QWidget *parent = 0);
+ ~TimedProfilDialog();
+ QTime GetTime();
+ QString GetName();
+protected:
+ void changeEvent(QEvent *e);
+ void accept();
+
+private:
+ Ui::TimedprofilDialog *ui;
+
+ QMaemo5ValueButton *v1;
+ QMaemo5ValueButton *v2;
+
+ QMaemo5ListPickSelector * list_pick;
+ QMaemo5TimePickSelector * time_pick;
+
+ QString name_of_profile;
+ QTime time_for_set;
+
+ void createNewLabels();
+ void createNewMaemoButtons(QStringList list);
+
+};
+
+#endif // TIMEDPROFILDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TimedprofilDialog</class>
+ <widget class="QDialog" name="TimedprofilDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Set timed profile</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="saveButton">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout"/>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>saveButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TimedprofilDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>7</x>
+ <y>19</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>7</x>
+ <y>38</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+#include <QtCore/QDebug> //Debug pro informace
+#include <QtCore/QSettings>
+#include <QtCore/QTimer>
+#include "timeprofile.h"
+#include "timedprofildialog.h"
+#include <QtCore/QStringList>
+#include <QtCore/QTime>
+/** TimeProfile()
+create new labels
+*/
+TimeProfile::TimeProfile(QWidget *parent,QSettings *set) :
+ QWidget(parent)
+{
+ settings = set;
+ timer = new QTimer(this);
+ timer->setSingleShot(true);//A single-shot timer fires only once
+ connect(timer,SIGNAL(timeout()),this,SLOT(TimerTimeout()));
+}
+
+/** SetTimer()
+create new labels
+*/
+void TimeProfile::SetTimer(QStringList list_of_profiles_n)
+{
+ TimedProfilDialog dialog(list_of_profiles_n, this);
+ int result = dialog.exec();
+ if(result)
+ {
+ QTime nula_cas(0,0);
+ // dialog.GetTime().msec()
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "time:" << dialog.GetTime() ;
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "different:" << nula_cas.msecsTo(dialog.GetTime());
+ if(dialog.GetTime() == nula_cas){
+ timer->stop();
+ profile = QString("");
+ emit s_set_timed_profile(QString(""));//send empty string
+ return;
+ }
+ timer->start(nula_cas.msecsTo(dialog.GetTime()));
+ profile = dialog.GetName();
+ emit s_set_timed_profile(profile);
+ }
+}
+
+/** TimerTimeout()
+timer timeout slot
+*/
+void TimeProfile::TimerTimeout()
+{
+ //qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "text::" << "timer timeout" ;
+ profile = QString("");
+ emit s_set_timed_profile(QString(""));//send empty string
+}
+
+/** ChangeInProfles()
+When profiles change , find profile
+if not exist stop this profile
+*/
+void TimeProfile::ChangeInProfles(QStringList list_profiles)
+{
+ if(!list_profiles.contains(profile))
+ {
+ timer->stop();
+ emit s_set_timed_profile(QString(""));//send empty string
+ }
+}
+
--- /dev/null
+#ifndef TIMEPROFILE_H
+#define TIMEPROFILE_H
+
+/*! \file timeprofile.h
+ \brief File .H for class timed profile
+\author Jakub Šplíchal <jakub.bzouk@gmail.com>
+Header file
+*/
+#include <QtCore/QStringList>
+#include <QWidget>
+class QSettings;
+class QTimer;
+
+/** \class TimeProfile
+ \brief class for setting timed profile
+ */
+
+class TimeProfile : public QWidget {
+ Q_OBJECT
+public:
+ TimeProfile(QWidget *parent = 0, QSettings *set = 0);
+
+ void SetTimer(QStringList list_of_profiles_n);
+
+private:
+ QSettings * settings;
+ QTimer *timer;
+ QString profile;
+
+public slots:
+ void ChangeInProfles(QStringList list_profiles);
+private slots:
+ void TimerTimeout();
+
+signals:
+ void s_set_timed_profile(QString Profile_name);
+};
+
+#endif // TIMEPROFILE_H