diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..879e0b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.o
+*.objs
+*.moc
+*~
+
diff --git a/ChangeLog b/ChangeLog
index 4653025..e5f63d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+v0.7 (25/03/2018)
+** User **
+ Set background calendar color to red or yellow when one account is negative or less than 200€ (configurable)
+ Add start date and end date for accounts, so don't need to hide it when it's closed
+ Remove some unused blank spaces in GUI
+ Operation modification now taken in account for Stats Panel
+ Resize rows to content at startup
+ Set default month to december for year != cur year (avoid new year bug)
+ New Windows build !
+
+** Dev **
+ Qt5 migration done !
+ StatsPanel code reworked, removing some bugs
+ Do not reload current panel when a modification is done, but reload other ones
+ Add Visual Studio project files
+ Remove libkdchart
+
+** Bugs **
+ Bug in expression parser, negative mark before parenthesis considered as positive.
+ Bug in FormulaDelegate : string copy was made in a wrong way
+ Initial and final negative account values were not displayed in red
+ Sub operations were not removed from database when deleting meta operation
+ Week lines were not re computed after deleting an operation
+ Default month selection should now be correct
+ Amount in SearchBanner were badly set (missing *100)
+ Prevent integer overflow when computing percents in CostRepartitionBanner
+ Fix some bugs in yearTo selection & fill in GenerateDialog
+ Don't count virtual operations in check mode
+ Bad account updated when it's changed on MainPanel
+
+
v0.6 (08/10/2016)
** User **
Set autofocus attribute to user in index.php
diff --git a/INSTALL b/INSTALL
index f484880..0ae7d6d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,9 @@
** Dependencies for compilation (on Debian) **
-libqt4-dev (>= 4.7)
-libqt4-sql-sqlite (>= 4.7)
-libofx4
+libqt5-dev
+libqt5sql5-sqlite
+libqt5charts5-dev
+libofx-dev
g++
make
gettext
diff --git a/Makefile b/Makefile
index 2a5ea41..1eaff8f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
-ROOT_DIR="/usr"
+#ROOT_DIR="/usr"
+ROOT_DIR="."
LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/"
SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/"
DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/"
@@ -7,13 +8,15 @@ BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/"
CXX=$(HOST)g++
KISSCOUNT=kc
-QT_PACKAGES="QtCore QtGui QtSql QtXml"
+QT_PACKAGES="Qt5Core Qt5Gui Qt5Sql Qt5Xml Qt5Widgets"
CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)`
-CXXFLAGS+=-Wall -Isrc -Isrc/win32
+CXXFLAGS+=-Wall -Isrc -Isrc/win32 -I${PWD}/lib/qt5charts/usr/include/x86_64-linux-gnu/qt5/ -L${PWD}/lib/qtcharts/lib/ -L${PWD}/lib/qt5charts/usr/lib/x86_64-linux-gnu/
+CXXFLAGS+=-Wall
+#-Dnullptr=0
ifdef WIN32
CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\"" -static
else
-CXXFLAGS+=-DRESOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC
+CXXFLAGS+=-DRESOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC -O0
# For developpers
#CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\""
endif
@@ -24,24 +27,24 @@ MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ')
MOCS=$(MOC_HEADERS:.hpp=.objs)
MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc)
-CXXFLAGS+=-Ilib/libkdchart/include -Ilib/libkdchart/src -Ilib/libkdchart/kdablibfakes/include
-CXXFLAGS+=-DKDCHART_BUILD_KDCHART_LIB
-KDCHART_SOURCES=$(shell find lib/libkdchart/src -name '*.cpp' -type f | tr '\n' ' ')
-KDCHART_OBJS=$(KDCHART_SOURCES:.cpp=.o)
-UI_CHARTSELECTOR=lib/libkdchart/src/ui_KDChartDatasetSelector.h
-KDCHART_MOC_HEADERS=$(shell find lib/libkdchart/src -name '*.h' -type f | tr '\n' ' ')
-KDCHART_MOCS=$(KDCHART_MOC_HEADERS:.h=.objs)
-KDCHART_MOCS_OBJS=$(KDCHART_MOC_HEADERS:.h=.moc)
-LDFLAGS+=lib/libkdchart.a
+#CXXFLAGS+=-Ilib/libkdchart/include -Ilib/libkdchart/src -Ilib/libkdchart/kdablibfakes/include
+#CXXFLAGS+=-DKDCHART_BUILD_KDCHART_LIB
+#KDCHART_SOURCES=$(shell find lib/libkdchart/src -name '*.cpp' -type f | tr '\n' ' ')
+#KDCHART_OBJS=$(KDCHART_SOURCES:.cpp=.o)
+#UI_CHARTSELECTOR=lib/libkdchart/src/ui_KDChartDatasetSelector.h
+#KDCHART_MOC_HEADERS=$(shell find lib/libkdchart/src -name '*.h' -type f | tr '\n' ' ')
+#KDCHART_MOCS=$(KDCHART_MOC_HEADERS:.h=.objs)
+#KDCHART_MOCS_OBJS=$(KDCHART_MOC_HEADERS:.h=.moc)
+#LDFLAGS+=lib/libkdchart.a
ifndef WIN32
LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)`
-LDFLAGS+=-lofx
+LDFLAGS+=-lofx -lQt5Charts
else
LDFLAGS+=lib_mingw_32/QtCore4.dll lib_mingw_32/QtGui4.dll lib_mingw_32/QtSql4.dll lib_mingw_32/QtXml4.dll
endif
-all: mojito lib/libkdchart.a $(KISSCOUNT)
+all: mojito $(KISSCOUNT)
clean_all: clean clean_libkdchart
@@ -64,17 +67,17 @@ clean:
%.moc : %.h
moc -nw $< -o $@
-mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS)
+mojito : $(MOCS_OBJS)
$(KISSCOUNT): $(MOCS) $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
-$(UI_CHARTSELECTOR): lib/libkdchart/src/KDChartDatasetSelector.ui
- uic $< > $(UI_CHARTSELECTOR)
- sed s/KDCHARTDATASETSELECTOR_H/UI_KDCHARTDATASETSELECTOR_H/g -i $(UI_CHARTSELECTOR)
+# $(UI_CHARTSELECTOR): lib/libkdchart/src/KDChartDatasetSelector.ui
+# uic $< > $(UI_CHARTSELECTOR)
+# sed s/KDCHARTDATASETSELECTOR_H/UI_KDCHARTDATASETSELECTOR_H/g -i $(UI_CHARTSELECTOR)
-lib/libkdchart.a: $(UI_CHARTSELECTOR) $(KDCHART_MOCS) $(KDCHART_OBJS)
- $(HOST)ar rcu lib/libkdchart.a $(KDCHART_MOCS) $(KDCHART_OBJS)
+# lib/libkdchart.a: $(UI_CHARTSELECTOR) $(KDCHART_MOCS) $(KDCHART_OBJS)
+# $(HOST)ar rcu lib/libkdchart.a $(KDCHART_MOCS) $(KDCHART_OBJS)
clean_libkdchart:
rm -rf lib/libkdchart.a
diff --git a/README b/README
index a0438e4..4f236f0 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
KissCount is personnal account software delivered under GPL v3 licence terms.
-Current version is 0.5
+Current version is 0.7
-Qt4 (>= 4.7), libqt4-sql-sqlite and libofx (Linux only) are needed
+Qt5, libqt5sql5-sqlite and libofx (Linux only) are needed
If you use web view, edit database.php and set $BDD_FILE, it's higly recommanded to use an SSL certificate.
diff --git a/README.fr b/README.fr
index 370b37c..58f6967 100644
--- a/README.fr
+++ b/README.fr
@@ -1,8 +1,8 @@
KissCount est un logiciel de gestion de comptes personnels délivré sous licence GPL v3
-La version actuelle est 0.5
+La version actuelle est 0.7
-Qt4 (>= 4.7), libqt4-sql-sqlite et libofx (Uniquement pour Linux) sont nécessaires
+Qt5, libqt5sql5-sqlite et libofx (Uniquement pour Linux) sont nécessaires
Si vous utilisez la version web pour visualiser vos comptes, éditez d'abord le fichier database.php en positionnant correctement la variable $BDD_FILE, il est fortement recommandé d'utiliser un certificat SSL.
diff --git a/TODO b/TODO
index 7a02502..12d9562 100644
--- a/TODO
+++ b/TODO
@@ -18,7 +18,6 @@ More translations
Printing (maybe in xml/html)
Refactor web view code
Plugins ?
-Qt 5
===============================================================
Will not be implemented
diff --git a/VisualStudio/KissCount.vcxproj b/VisualStudio/KissCount.vcxproj
new file mode 100644
index 0000000..3487412
--- /dev/null
+++ b/VisualStudio/KissCount.vcxproj
@@ -0,0 +1,212 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {B12702AD-ABFB-343A-A199-8E24837244A3}
+ Qt4VSv1.0
+ 10.0.16299.0
+
+
+
+ Application
+ v141
+
+
+ Application
+ v141
+
+
+
+
+ true
+ UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_SQL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;%(PreprocessorDefinitions);RESOURCES_ROOT="kcresources/"
+ .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtSql;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;C:\Users\Greg\source\repos\kisscount\src;C:\Users\Greg\source\repos\kisscount\src\controller;C:\Users\Greg\source\repos\kisscount\src\model;C:\Users\Greg\source\repos\kisscount\src\view;%(AdditionalIncludeDirectories)
+
+ MultiThreadedDLL
+ true
+
+
+ Windows
+ $(OutDir)\$(ProjectName).exe
+ $(QTDIR)\lib;%(AdditionalLibraryDirectories)
+ false
+ qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Sql.lib;Qt5Widgets.lib;Qt5Xml.lib;Qt5Charts.lib;%(AdditionalDependencies)
+
+
+ %(FullPath)
+ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ output
+ Moc'ing %(Identity)...
+ .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName)\.;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtSql;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;C:\Users\Greg\source\repos\kisscount\src;C:\Users\Greg\source\repos\kisscount\src\controller;C:\Users\Greg\source\repos\kisscount\src\model;C:\Users\Greg\source\repos\kisscount\src\view
+ UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_SQL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;RESOURCES_ROOT="kcresources/"
+ $(QTDIR)
+
+
+ Uic'ing %(Identity)...
+ .\GeneratedFiles\ui_%(Filename).h
+
+
+ Rcc'ing %(Identity)...
+ .\GeneratedFiles\qrc_%(Filename).cpp
+
+
+
+ $(MSBuildProjectDirectory)\QtMsBuild
+
+
+ $(SolutionDir)$(Platform)\$(Configuration)\
+
+
+ $(SolutionDir)$(Platform)\$(Configuration)\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_SQL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;%(PreprocessorDefinitions);RESOURCES_ROOT="kcresources/";
+ .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtSql;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;C:\Users\Greg\source\repos\kisscount\src;C:\Users\Greg\source\repos\kisscount\src\controller;C:\Users\Greg\source\repos\kisscount\src\model;C:\Users\Greg\source\repos\kisscount\src\view;%(AdditionalIncludeDirectories)
+ Disabled
+ ProgramDatabase
+ MultiThreadedDebugDLL
+ true
+
+
+ Windows
+ $(OutDir)\$(ProjectName).exe
+ $(QTDIR)\lib;%(AdditionalLibraryDirectories)
+ true
+ qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Sqld.lib;Qt5Widgetsd.lib;Qt5Xmld.lib;Qt5Chartsd.lib;%(AdditionalDependencies)
+
+
+ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp
+ Moc'ing %(Identity)...
+ .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName)\.;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtSql;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;C:\Users\Greg\source\repos\kisscount\src;C:\Users\Greg\source\repos\kisscount\src\controller;C:\Users\Greg\source\repos\kisscount\src\model;C:\Users\Greg\source\repos\kisscount\src\view
+ UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_SQL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;RESOURCES_ROOT="kcresources/";
+
+
+ Uic'ing %(Identity)...
+ .\GeneratedFiles\ui_%(Filename).h
+
+
+ Rcc'ing %(Identity)...
+ .\GeneratedFiles\qrc_%(Filename).cpp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VisualStudio/KissCount.vcxproj.filters b/VisualStudio/KissCount.vcxproj.filters
new file mode 100644
index 0000000..3749fb1
--- /dev/null
+++ b/VisualStudio/KissCount.vcxproj.filters
@@ -0,0 +1,274 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}
+ qrc;*
+ false
+
+
+ {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
+ ui
+
+
+ {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}
+ qrc;*
+ false
+
+
+ {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}
+ moc;h;cpp
+ False
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/VisualStudio/KissCount.vcxproj.user b/VisualStudio/KissCount.vcxproj.user
new file mode 100644
index 0000000..6fe244f
--- /dev/null
+++ b/VisualStudio/KissCount.vcxproj.user
@@ -0,0 +1,12 @@
+
+
+
+
+ C:\Qt\5.9.4\msvc2017_64
+ PATH=$(QTDIR)\bin%3b$(PATH)
+
+
+ C:\Qt\5.9.4\msvc2017_64
+ PATH=$(QTDIR)\bin%3b$(PATH)
+
+
\ No newline at end of file
diff --git a/debian/control b/debian/control
index 8717e27..e735b6b 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: kisscount
Section: misc
Priority: extra
Maintainer: Grégory Soutadé
-Build-Depends: debhelper (>= 7.0.50~), libofx-dev, libqt4-dev (>= 4.7), libqt4-sql-sqlite
+Build-Depends: debhelper (>= 7.0.50~), libofx-dev, libqt5charts5-dev (>=5.10), libqt5gui5 (>=5.10), libqt5qml5 (>=5.10), libqt5quick5 (>=5.10), libqt5quickwidgets5 (>=5.10), libqt5sql5 (>=5.10), libqt5sql5-sqlite (>=5.10), libqt5widgets5 (>=5.10), libqt5xml5 (>=5.10)
Standards-Version: 3.9.1
Homepage: http://indefero.soutade.fr/p/kisscount/
Vcs-Git: git://soutade.fr/kisscount.git
diff --git a/lib/libkdchart/Doxyfile b/lib/libkdchart/Doxyfile
deleted file mode 100644
index 6f95fa0..0000000
--- a/lib/libkdchart/Doxyfile
+++ /dev/null
@@ -1,1241 +0,0 @@
-# Doxyfile 1.4.4
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = "KD Chart 2"
-
-# 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 = [rev. 2.4]
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = doc/
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. 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 the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# 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 = reimpl=\n[reimplemented]\n
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-# Mirko: I have enabled this to be able to browse through the doxygen docs to
-# find some hidden relationships between sources.
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# 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 = NO
-
-# 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 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 = YES
-
-# 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 INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = NO
-
-# 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 = YES
-
-# 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 = YES
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-# Mirko: I did not find any use of sectionname in our sources.
-# ENABLED_SECTIONS = v100
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is YES.
-
-SHOW_DIRECTORIES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the progam writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = 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.
-#
-# Note: We don not include the include directory, but at the beginning of each
-# class documentation we have Qt-like comments showing the
-# #include statement to be used.
-
-INPUT = src
-
-# 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
-
-FILE_PATTERNS = *.h *.cpp
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# be 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 = .moc .obj .ui
-
-# The EXCLUDE_SYMLINKS tag can be used to 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/*
-#
-# khz: Note that all *Grid.cpp/*Grid.h classes are internal, since users
-# are supposed to use the coordinate plane's accessor methods only.
-
-EXCLUDE_PATTERNS = moc_* *.moc *_p.h ui_*.h *Grid.* CartesianCoordinateTransformation.* kdchart_export.*
-
-# 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 = images
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX = KDChart
-
-#---------------------------------------------------------------------------
-# 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 = refman
-
-# 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 = images/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 1
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = YES
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. 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 = kdchart.tag
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = 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)
-
-# Mirko: this is very useful, please install graphviz if you do not have it.
-HAVE_DOT = YES
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# 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 MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_WIDTH = 800
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 600
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that a graph may be further truncated if the graph's
-# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
-# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
-# the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# 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 = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = YES
-
-SERVER_BASED_SEARCH = NO
diff --git a/lib/libkdchart/LICENSE.GPL b/lib/libkdchart/LICENSE.GPL
deleted file mode 100644
index 7f506fb..0000000
--- a/lib/libkdchart/LICENSE.GPL
+++ /dev/null
@@ -1,1027 +0,0 @@
-
- The KD Chart Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB.
-
- You may use, distribute and copy the KD Chart Library under the terms of
- the GNU General Public License version 2 or under the terms of GNU General
- Public License version 3 both of which are displayed below.
-
--------------------------------------------------------------------------
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C) 19yy
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
--------------------------------------------------------------------------
-
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
- software and other kinds of works.
-
- The licenses for most software and other practical works are designed
- to take away your freedom to share and change the works. By contrast,
- the GNU General Public License is intended to guarantee your freedom to
- share and change all versions of a program--to make sure it remains free
- software for all its users. We, the Free Software Foundation, use the
- GNU General Public License for most of our software; it applies also to
- any other work released this way by its authors. You can apply it to
- your programs, too.
-
- When we speak of free software, we are referring to freedom, not
- price. Our General Public Licenses are designed to make sure that you
- have the freedom to distribute copies of free software (and charge for
- them if you wish), that you receive source code or can get it if you
- want it, that you can change the software or use pieces of it in new
- free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
- these rights or asking you to surrender the rights. Therefore, you have
- certain responsibilities if you distribute copies of the software, or if
- you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
- gratis or for a fee, you must pass on to the recipients the same
- freedoms that you received. You must make sure that they, too, receive
- or can get the source code. And you must show them these terms so they
- know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
- (1) assert copyright on the software, and (2) offer you this License
- giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
- that there is no warranty for this free software. For both users' and
- authors' sake, the GPL requires that modified versions be marked as
- changed, so that their problems will not be attributed erroneously to
- authors of previous versions.
-
- Some devices are designed to deny users access to install or run
- modified versions of the software inside them, although the manufacturer
- can do so. This is fundamentally incompatible with the aim of
- protecting users' freedom to change the software. The systematic
- pattern of such abuse occurs in the area of products for individuals to
- use, which is precisely where it is most unacceptable. Therefore, we
- have designed this version of the GPL to prohibit the practice for those
- products. If such problems arise substantially in other domains, we
- stand ready to extend this provision to those domains in future versions
- of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
- States should not allow patents to restrict development and use of
- software on general-purpose computers, but in those that do, we wish to
- avoid the special danger that patents applied to a free program could
- make it effectively proprietary. To prevent this, the GPL assures that
- patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
- modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
- works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
- License. Each licensee is addressed as "you". "Licensees" and
- "recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
- in a fashion requiring copyright permission, other than the making of an
- exact copy. The resulting work is called a "modified version" of the
- earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
- on the Program.
-
- To "propagate" a work means to do anything with it that, without
- permission, would make you directly or secondarily liable for
- infringement under applicable copyright law, except executing it on a
- computer or modifying a private copy. Propagation includes copying,
- distribution (with or without modification), making available to the
- public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
- parties to make or receive copies. Mere interaction with a user through
- a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
- to the extent that it includes a convenient and prominently visible
- feature that (1) displays an appropriate copyright notice, and (2)
- tells the user that there is no warranty for the work (except to the
- extent that warranties are provided), that licensees may convey the
- work under this License, and how to view a copy of this License. If
- the interface presents a list of user commands or options, such as a
- menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
- for making modifications to it. "Object code" means any non-source
- form of a work.
-
- A "Standard Interface" means an interface that either is an official
- standard defined by a recognized standards body, or, in the case of
- interfaces specified for a particular programming language, one that
- is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
- than the work as a whole, that (a) is included in the normal form of
- packaging a Major Component, but which is not part of that Major
- Component, and (b) serves only to enable use of the work with that
- Major Component, or to implement a Standard Interface for which an
- implementation is available to the public in source code form. A
- "Major Component", in this context, means a major essential component
- (kernel, window system, and so on) of the specific operating system
- (if any) on which the executable work runs, or a compiler used to
- produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
- the source code needed to generate, install, and (for an executable
- work) run the object code and to modify the work, including scripts to
- control those activities. However, it does not include the work's
- System Libraries, or general-purpose tools or generally available free
- programs which are used unmodified in performing those activities but
- which are not part of the work. For example, Corresponding Source
- includes interface definition files associated with source files for
- the work, and the source code for shared libraries and dynamically
- linked subprograms that the work is specifically designed to require,
- such as by intimate data communication or control flow between those
- subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
- can regenerate automatically from other parts of the Corresponding
- Source.
-
- The Corresponding Source for a work in source code form is that
- same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
- copyright on the Program, and are irrevocable provided the stated
- conditions are met. This License explicitly affirms your unlimited
- permission to run the unmodified Program. The output from running a
- covered work is covered by this License only if the output, given its
- content, constitutes a covered work. This License acknowledges your
- rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
- convey, without conditions so long as your license otherwise remains
- in force. You may convey covered works to others for the sole purpose
- of having them make modifications exclusively for you, or provide you
- with facilities for running those works, provided that you comply with
- the terms of this License in conveying all material for which you do
- not control copyright. Those thus making or running the covered works
- for you must do so exclusively on your behalf, under your direction
- and control, on terms that prohibit them from making any copies of
- your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
- the conditions stated below. Sublicensing is not allowed; section 10
- makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
- measure under any applicable law fulfilling obligations under article
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
- similar laws prohibiting or restricting circumvention of such
- measures.
-
- When you convey a covered work, you waive any legal power to forbid
- circumvention of technological measures to the extent such circumvention
- is effected by exercising rights under this License with respect to
- the covered work, and you disclaim any intention to limit operation or
- modification of the work as a means of enforcing, against the work's
- users, your or third parties' legal rights to forbid circumvention of
- technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
- receive it, in any medium, provided that you conspicuously and
- appropriately publish on each copy an appropriate copyright notice;
- keep intact all notices stating that this License and any
- non-permissive terms added in accord with section 7 apply to the code;
- keep intact all notices of the absence of any warranty; and give all
- recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
- and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
- produce it from the Program, in the form of source code under the
- terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
- works, which are not by their nature extensions of the covered work,
- and which are not combined with it such as to form a larger program,
- in or on a volume of a storage or distribution medium, is called an
- "aggregate" if the compilation and its resulting copyright are not
- used to limit the access or legal rights of the compilation's users
- beyond what the individual works permit. Inclusion of a covered work
- in an aggregate does not cause this License to apply to the other
- parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
- of sections 4 and 5, provided that you also convey the
- machine-readable Corresponding Source under the terms of this License,
- in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
- from the Corresponding Source as a System Library, need not be
- included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
- tangible personal property which is normally used for personal, family,
- or household purposes, or (2) anything designed or sold for incorporation
- into a dwelling. In determining whether a product is a consumer product,
- doubtful cases shall be resolved in favor of coverage. For a particular
- product received by a particular user, "normally used" refers to a
- typical or common use of that class of product, regardless of the status
- of the particular user or of the way in which the particular user
- actually uses, or expects or is expected to use, the product. A product
- is a consumer product regardless of whether the product has substantial
- commercial, industrial or non-consumer uses, unless such uses represent
- the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
- procedures, authorization keys, or other information required to install
- and execute modified versions of a covered work in that User Product from
- a modified version of its Corresponding Source. The information must
- suffice to ensure that the continued functioning of the modified object
- code is in no case prevented or interfered with solely because
- modification has been made.
-
- If you convey an object code work under this section in, or with, or
- specifically for use in, a User Product, and the conveying occurs as
- part of a transaction in which the right of possession and use of the
- User Product is transferred to the recipient in perpetuity or for a
- fixed term (regardless of how the transaction is characterized), the
- Corresponding Source conveyed under this section must be accompanied
- by the Installation Information. But this requirement does not apply
- if neither you nor any third party retains the ability to install
- modified object code on the User Product (for example, the work has
- been installed in ROM).
-
- The requirement to provide Installation Information does not include a
- requirement to continue to provide support service, warranty, or updates
- for a work that has been modified or installed by the recipient, or for
- the User Product in which it has been modified or installed. Access to a
- network may be denied when the modification itself materially and
- adversely affects the operation of the network or violates the rules and
- protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
- in accord with this section must be in a format that is publicly
- documented (and with an implementation available to the public in
- source code form), and must require no special password or key for
- unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
- License by making exceptions from one or more of its conditions.
- Additional permissions that are applicable to the entire Program shall
- be treated as though they were included in this License, to the extent
- that they are valid under applicable law. If additional permissions
- apply only to part of the Program, that part may be used separately
- under those permissions, but the entire Program remains governed by
- this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
- remove any additional permissions from that copy, or from any part of
- it. (Additional permissions may be written to require their own
- removal in certain cases when you modify the work.) You may place
- additional permissions on material, added by you to a covered work,
- for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
- add to a covered work, you may (if authorized by the copyright holders of
- that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
- restrictions" within the meaning of section 10. If the Program as you
- received it, or any part of it, contains a notice stating that it is
- governed by this License along with a term that is a further
- restriction, you may remove that term. If a license document contains
- a further restriction but permits relicensing or conveying under this
- License, you may add to a covered work material governed by the terms
- of that license document, provided that the further restriction does
- not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
- must place, in the relevant source files, a statement of the
- additional terms that apply to those files, or a notice indicating
- where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
- form of a separately written license, or stated as exceptions;
- the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
- provided under this License. Any attempt otherwise to propagate or
- modify it is void, and will automatically terminate your rights under
- this License (including any patent licenses granted under the third
- paragraph of section 11).
-
- However, if you cease all violation of this License, then your
- license from a particular copyright holder is reinstated (a)
- provisionally, unless and until the copyright holder explicitly and
- finally terminates your license, and (b) permanently, if the copyright
- holder fails to notify you of the violation by some reasonable means
- prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
- reinstated permanently if the copyright holder notifies you of the
- violation by some reasonable means, this is the first time you have
- received notice of violation of this License (for any work) from that
- copyright holder, and you cure the violation prior to 30 days after
- your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
- licenses of parties who have received copies or rights from you under
- this License. If your rights have been terminated and not permanently
- reinstated, you do not qualify to receive new licenses for the same
- material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
- run a copy of the Program. Ancillary propagation of a covered work
- occurring solely as a consequence of using peer-to-peer transmission
- to receive a copy likewise does not require acceptance. However,
- nothing other than this License grants you permission to propagate or
- modify any covered work. These actions infringe copyright if you do
- not accept this License. Therefore, by modifying or propagating a
- covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
- receives a license from the original licensors, to run, modify and
- propagate that work, subject to this License. You are not responsible
- for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
- organization, or substantially all assets of one, or subdividing an
- organization, or merging organizations. If propagation of a covered
- work results from an entity transaction, each party to that
- transaction who receives a copy of the work also receives whatever
- licenses to the work the party's predecessor in interest had or could
- give under the previous paragraph, plus a right to possession of the
- Corresponding Source of the work from the predecessor in interest, if
- the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
- rights granted or affirmed under this License. For example, you may
- not impose a license fee, royalty, or other charge for exercise of
- rights granted under this License, and you may not initiate litigation
- (including a cross-claim or counterclaim in a lawsuit) alleging that
- any patent claim is infringed by making, using, selling, offering for
- sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
- License of the Program or a work on which the Program is based. The
- work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
- owned or controlled by the contributor, whether already acquired or
- hereafter acquired, that would be infringed by some manner, permitted
- by this License, of making, using, or selling its contributor version,
- but do not include claims that would be infringed only as a
- consequence of further modification of the contributor version. For
- purposes of this definition, "control" includes the right to grant
- patent sublicenses in a manner consistent with the requirements of
- this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
- patent license under the contributor's essential patent claims, to
- make, use, sell, offer for sale, import and otherwise run, modify and
- propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
- agreement or commitment, however denominated, not to enforce a patent
- (such as an express permission to practice a patent or covenant not to
- sue for patent infringement). To "grant" such a patent license to a
- party means to make such an agreement or commitment not to enforce a
- patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
- and the Corresponding Source of the work is not available for anyone
- to copy, free of charge and under the terms of this License, through a
- publicly available network server or other readily accessible means,
- then you must either (1) cause the Corresponding Source to be so
- available, or (2) arrange to deprive yourself of the benefit of the
- patent license for this particular work, or (3) arrange, in a manner
- consistent with the requirements of this License, to extend the patent
- license to downstream recipients. "Knowingly relying" means you have
- actual knowledge that, but for the patent license, your conveying the
- covered work in a country, or your recipient's use of the covered work
- in a country, would infringe one or more identifiable patents in that
- country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
- arrangement, you convey, or propagate by procuring conveyance of, a
- covered work, and grant a patent license to some of the parties
- receiving the covered work authorizing them to use, propagate, modify
- or convey a specific copy of the covered work, then the patent license
- you grant is automatically extended to all recipients of the covered
- work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
- the scope of its coverage, prohibits the exercise of, or is
- conditioned on the non-exercise of one or more of the rights that are
- specifically granted under this License. You may not convey a covered
- work if you are a party to an arrangement with a third party that is
- in the business of distributing software, under which you make payment
- to the third party based on the extent of your activity of conveying
- the work, and under which the third party grants, to any of the
- parties who would receive the covered work from you, a discriminatory
- patent license (a) in connection with copies of the covered work
- conveyed by you (or copies made from those copies), or (b) primarily
- for and in connection with specific products or compilations that
- contain the covered work, unless you entered into that arrangement,
- or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
- any implied license or other defenses to infringement that may
- otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
- otherwise) that contradict the conditions of this License, they do not
- excuse you from the conditions of this License. If you cannot convey a
- covered work so as to satisfy simultaneously your obligations under this
- License and any other pertinent obligations, then as a consequence you may
- not convey it at all. For example, if you agree to terms that obligate you
- to collect a royalty for further conveying from those to whom you convey
- the Program, the only way you could satisfy both those terms and this
- License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
- permission to link or combine any covered work with a work licensed
- under version 3 of the GNU Affero General Public License into a single
- combined work, and to convey the resulting work. The terms of this
- License will continue to apply to the part which is the covered work,
- but the special requirements of the GNU Affero General Public License,
- section 13, concerning interaction through a network will apply to the
- combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
- the GNU General Public License from time to time. Such new versions will
- be similar in spirit to the present version, but may differ in detail to
- address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
- Program specifies that a certain numbered version of the GNU General
- Public License "or any later version" applies to it, you have the
- option of following the terms and conditions either of that numbered
- version or of any later version published by the Free Software
- Foundation. If the Program does not specify a version number of the
- GNU General Public License, you may choose any version ever published
- by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
- versions of the GNU General Public License can be used, that proxy's
- public statement of acceptance of a version permanently authorizes you
- to choose that version for the Program.
-
- Later license versions may give you additional or different
- permissions. However, no additional obligations are imposed on any
- author or copyright holder as a result of your choosing to follow a
- later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
- APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
- IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
- USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
- PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
- above cannot be given local legal effect according to their terms,
- reviewing courts shall apply local law that most closely approximates
- an absolute waiver of all civil liability in connection with the
- Program, unless a warranty or assumption of liability accompanies a
- copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
- possible use to the public, the best way to achieve this is to make it
- free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
- to attach them to the start of each source file to most effectively
- state the exclusion of warranty; and each file should have at least
- the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
- Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
- notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
- The hypothetical commands `show w' and `show c' should show the appropriate
- parts of the General Public License. Of course, your program's commands
- might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
- if any, to sign a "copyright disclaimer" for the program, if necessary.
- For more information on this, and how to apply and follow the GNU GPL, see
- .
-
- The GNU General Public License does not permit incorporating your program
- into proprietary programs. If your program is a subroutine library, you
- may consider it more useful to permit linking proprietary applications with
- the library. If this is what you want to do, use the GNU Lesser General
- Public License instead of this License. But first, please read
- .
-
--------------------------------------------------------------------------
diff --git a/lib/libkdchart/README.txt b/lib/libkdchart/README.txt
deleted file mode 100644
index 1b0963d..0000000
--- a/lib/libkdchart/README.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Welcome to KD Chart 2, Klaralvdalens Datakonsult's charting engine for Qt!
-
-Please refer to the license file for conditions of use.
-
-After reading the introductory overview files in doc/
-you will find more information at three places:
-
-detailed browsable API reference: doc/refman/index.html
- or: http://docs.kdab.com/kdchart/2.4/
-programmers manual with examples: doc/manual/kdchart.pdf
-our sorted example programs: examples/
-
-In case of additional questions during evaluation or use of
-KD Chart please contact our technical support by mail:
-
- kdchart-support@kdab.com
-
-We thank you for your interest in KD Chart and we are here
-to assist you if the documentation leaves open questions or
-if you just need some help with finding the best way in which
-to realize your charting ideas.
-
-The KDAB KD Chart Support Team.
-
diff --git a/lib/libkdchart/include/KDChartAbstractAxis b/lib/libkdchart/include/KDChartAbstractAxis
deleted file mode 100644
index f2edb6e..0000000
--- a/lib/libkdchart/include/KDChartAbstractAxis
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractAxis.h"
diff --git a/lib/libkdchart/include/KDChartAbstractCartesianDiagram b/lib/libkdchart/include/KDChartAbstractCartesianDiagram
deleted file mode 100644
index bb16f0f..0000000
--- a/lib/libkdchart/include/KDChartAbstractCartesianDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractCartesianDiagram.h"
diff --git a/lib/libkdchart/include/KDChartAbstractCoordinatePlane b/lib/libkdchart/include/KDChartAbstractCoordinatePlane
deleted file mode 100644
index 0e4a579..0000000
--- a/lib/libkdchart/include/KDChartAbstractCoordinatePlane
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractCoordinatePlane.h"
diff --git a/lib/libkdchart/include/KDChartAbstractDiagram b/lib/libkdchart/include/KDChartAbstractDiagram
deleted file mode 100644
index b6ab18e..0000000
--- a/lib/libkdchart/include/KDChartAbstractDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractDiagram.h"
diff --git a/lib/libkdchart/include/KDChartAbstractPieDiagram b/lib/libkdchart/include/KDChartAbstractPieDiagram
deleted file mode 100644
index a2e70ba..0000000
--- a/lib/libkdchart/include/KDChartAbstractPieDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractPieDiagram.h"
diff --git a/lib/libkdchart/include/KDChartAbstractPolarDiagram b/lib/libkdchart/include/KDChartAbstractPolarDiagram
deleted file mode 100644
index 5df6668..0000000
--- a/lib/libkdchart/include/KDChartAbstractPolarDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractPolarDiagram.h"
diff --git a/lib/libkdchart/include/KDChartAbstractProxyModel b/lib/libkdchart/include/KDChartAbstractProxyModel
deleted file mode 100644
index d2d315d..0000000
--- a/lib/libkdchart/include/KDChartAbstractProxyModel
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractProxyModel.h"
diff --git a/lib/libkdchart/include/KDChartAbstractTernaryDiagram b/lib/libkdchart/include/KDChartAbstractTernaryDiagram
deleted file mode 100644
index 1a2ceb8..0000000
--- a/lib/libkdchart/include/KDChartAbstractTernaryDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractTernaryDiagram.h"
diff --git a/lib/libkdchart/include/KDChartAbstractThreeDAttributes b/lib/libkdchart/include/KDChartAbstractThreeDAttributes
deleted file mode 100644
index 4b85895..0000000
--- a/lib/libkdchart/include/KDChartAbstractThreeDAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAbstractThreeDAttributes.h"
diff --git a/lib/libkdchart/include/KDChartAttributesModel b/lib/libkdchart/include/KDChartAttributesModel
deleted file mode 100644
index 4107ffb..0000000
--- a/lib/libkdchart/include/KDChartAttributesModel
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartAttributesModel.h"
diff --git a/lib/libkdchart/include/KDChartBackgroundAttributes b/lib/libkdchart/include/KDChartBackgroundAttributes
deleted file mode 100644
index f225d5d..0000000
--- a/lib/libkdchart/include/KDChartBackgroundAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartBackgroundAttributes.h"
diff --git a/lib/libkdchart/include/KDChartBarAttributes b/lib/libkdchart/include/KDChartBarAttributes
deleted file mode 100644
index ebfabcc..0000000
--- a/lib/libkdchart/include/KDChartBarAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartBarAttributes.h"
diff --git a/lib/libkdchart/include/KDChartBarDiagram b/lib/libkdchart/include/KDChartBarDiagram
deleted file mode 100644
index 81a851e..0000000
--- a/lib/libkdchart/include/KDChartBarDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartBarDiagram.h"
diff --git a/lib/libkdchart/include/KDChartCartesianAxis b/lib/libkdchart/include/KDChartCartesianAxis
deleted file mode 100644
index ff1b11d..0000000
--- a/lib/libkdchart/include/KDChartCartesianAxis
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartCartesianAxis.h"
diff --git a/lib/libkdchart/include/KDChartCartesianCoordinatePlane b/lib/libkdchart/include/KDChartCartesianCoordinatePlane
deleted file mode 100644
index 9f9949d..0000000
--- a/lib/libkdchart/include/KDChartCartesianCoordinatePlane
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartCartesianCoordinatePlane.h"
diff --git a/lib/libkdchart/include/KDChartChart b/lib/libkdchart/include/KDChartChart
deleted file mode 100644
index e25cb55..0000000
--- a/lib/libkdchart/include/KDChartChart
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartChart.h"
diff --git a/lib/libkdchart/include/KDChartDataValueAttributes b/lib/libkdchart/include/KDChartDataValueAttributes
deleted file mode 100644
index 84b0bfb..0000000
--- a/lib/libkdchart/include/KDChartDataValueAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartDataValueAttributes.h"
diff --git a/lib/libkdchart/include/KDChartDatasetProxyModel b/lib/libkdchart/include/KDChartDatasetProxyModel
deleted file mode 100644
index b7ffe3f..0000000
--- a/lib/libkdchart/include/KDChartDatasetProxyModel
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartDatasetProxyModel.h"
diff --git a/lib/libkdchart/include/KDChartDatasetSelector b/lib/libkdchart/include/KDChartDatasetSelector
deleted file mode 100644
index 1567d38..0000000
--- a/lib/libkdchart/include/KDChartDatasetSelector
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartDatasetSelector.h"
diff --git a/lib/libkdchart/include/KDChartDiagramObserver b/lib/libkdchart/include/KDChartDiagramObserver
deleted file mode 100644
index a4c7f6c..0000000
--- a/lib/libkdchart/include/KDChartDiagramObserver
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartDiagramObserver.h"
diff --git a/lib/libkdchart/include/KDChartEnums b/lib/libkdchart/include/KDChartEnums
deleted file mode 100644
index 30c46a8..0000000
--- a/lib/libkdchart/include/KDChartEnums
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartEnums.h"
diff --git a/lib/libkdchart/include/KDChartFrameAttributes b/lib/libkdchart/include/KDChartFrameAttributes
deleted file mode 100644
index 7c40ffb..0000000
--- a/lib/libkdchart/include/KDChartFrameAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartFrameAttributes.h"
diff --git a/lib/libkdchart/include/KDChartGlobal b/lib/libkdchart/include/KDChartGlobal
deleted file mode 100644
index 26019c8..0000000
--- a/lib/libkdchart/include/KDChartGlobal
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartGlobal.h"
diff --git a/lib/libkdchart/include/KDChartGridAttributes b/lib/libkdchart/include/KDChartGridAttributes
deleted file mode 100644
index cbe8f48..0000000
--- a/lib/libkdchart/include/KDChartGridAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartGridAttributes.h"
diff --git a/lib/libkdchart/include/KDChartHeaderFooter b/lib/libkdchart/include/KDChartHeaderFooter
deleted file mode 100644
index 51d2883..0000000
--- a/lib/libkdchart/include/KDChartHeaderFooter
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartHeaderFooter.h"
diff --git a/lib/libkdchart/include/KDChartLegend b/lib/libkdchart/include/KDChartLegend
deleted file mode 100644
index 40fe204..0000000
--- a/lib/libkdchart/include/KDChartLegend
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartLegend.h"
diff --git a/lib/libkdchart/include/KDChartLeveyJenningsAxis b/lib/libkdchart/include/KDChartLeveyJenningsAxis
deleted file mode 100644
index 364159f..0000000
--- a/lib/libkdchart/include/KDChartLeveyJenningsAxis
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/LeveyJennings/KDChartLeveyJenningsAxis.h"
diff --git a/lib/libkdchart/include/KDChartLeveyJenningsCoordinatePlane b/lib/libkdchart/include/KDChartLeveyJenningsCoordinatePlane
deleted file mode 100644
index 1dba9ca..0000000
--- a/lib/libkdchart/include/KDChartLeveyJenningsCoordinatePlane
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/LeveyJennings/KDChartLeveyJenningsCoordinatePlane.h"
diff --git a/lib/libkdchart/include/KDChartLeveyJenningsDiagram b/lib/libkdchart/include/KDChartLeveyJenningsDiagram
deleted file mode 100644
index 0f1e2d2..0000000
--- a/lib/libkdchart/include/KDChartLeveyJenningsDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/LeveyJennings/KDChartLeveyJenningsDiagram.h"
diff --git a/lib/libkdchart/include/KDChartLeveyJenningsGrid b/lib/libkdchart/include/KDChartLeveyJenningsGrid
deleted file mode 100644
index 87f6917..0000000
--- a/lib/libkdchart/include/KDChartLeveyJenningsGrid
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/LeveyJennings/KDChartLeveyJenningsGrid.h"
diff --git a/lib/libkdchart/include/KDChartLeveyJenningsGridAttributes b/lib/libkdchart/include/KDChartLeveyJenningsGridAttributes
deleted file mode 100644
index 32dd56d..0000000
--- a/lib/libkdchart/include/KDChartLeveyJenningsGridAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/LeveyJennings/KDChartLeveyJenningsGridAttributes.h"
diff --git a/lib/libkdchart/include/KDChartLineAttributes b/lib/libkdchart/include/KDChartLineAttributes
deleted file mode 100644
index 003899d..0000000
--- a/lib/libkdchart/include/KDChartLineAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartLineAttributes.h"
diff --git a/lib/libkdchart/include/KDChartLineDiagram b/lib/libkdchart/include/KDChartLineDiagram
deleted file mode 100644
index e8bbe31..0000000
--- a/lib/libkdchart/include/KDChartLineDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartLineDiagram.h"
diff --git a/lib/libkdchart/include/KDChartMarkerAttributes b/lib/libkdchart/include/KDChartMarkerAttributes
deleted file mode 100644
index cc043e6..0000000
--- a/lib/libkdchart/include/KDChartMarkerAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartMarkerAttributes.h"
diff --git a/lib/libkdchart/include/KDChartMeasure b/lib/libkdchart/include/KDChartMeasure
deleted file mode 100644
index e9bd30a..0000000
--- a/lib/libkdchart/include/KDChartMeasure
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartMeasure.h"
diff --git a/lib/libkdchart/include/KDChartPaintContext b/lib/libkdchart/include/KDChartPaintContext
deleted file mode 100644
index 0dd1d0c..0000000
--- a/lib/libkdchart/include/KDChartPaintContext
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPaintContext.h"
diff --git a/lib/libkdchart/include/KDChartPalette b/lib/libkdchart/include/KDChartPalette
deleted file mode 100644
index 85f0abe..0000000
--- a/lib/libkdchart/include/KDChartPalette
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPalette.h"
diff --git a/lib/libkdchart/include/KDChartPieAttributes b/lib/libkdchart/include/KDChartPieAttributes
deleted file mode 100644
index 8f4c7ab..0000000
--- a/lib/libkdchart/include/KDChartPieAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPieAttributes.h"
diff --git a/lib/libkdchart/include/KDChartPieDiagram b/lib/libkdchart/include/KDChartPieDiagram
deleted file mode 100644
index 9f48e78..0000000
--- a/lib/libkdchart/include/KDChartPieDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPieDiagram.h"
diff --git a/lib/libkdchart/include/KDChartPlotter b/lib/libkdchart/include/KDChartPlotter
deleted file mode 100644
index f418eff..0000000
--- a/lib/libkdchart/include/KDChartPlotter
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPlotter.h"
diff --git a/lib/libkdchart/include/KDChartPolarCoordinatePlane b/lib/libkdchart/include/KDChartPolarCoordinatePlane
deleted file mode 100644
index 5fe756c..0000000
--- a/lib/libkdchart/include/KDChartPolarCoordinatePlane
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPolarCoordinatePlane.h"
diff --git a/lib/libkdchart/include/KDChartPolarDiagram b/lib/libkdchart/include/KDChartPolarDiagram
deleted file mode 100644
index f85a6a2..0000000
--- a/lib/libkdchart/include/KDChartPolarDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPolarDiagram.h"
diff --git a/lib/libkdchart/include/KDChartPosition b/lib/libkdchart/include/KDChartPosition
deleted file mode 100644
index 10b53ea..0000000
--- a/lib/libkdchart/include/KDChartPosition
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartPosition.h"
diff --git a/lib/libkdchart/include/KDChartRelativePosition b/lib/libkdchart/include/KDChartRelativePosition
deleted file mode 100644
index cb1acb5..0000000
--- a/lib/libkdchart/include/KDChartRelativePosition
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartRelativePosition.h"
diff --git a/lib/libkdchart/include/KDChartRingDiagram b/lib/libkdchart/include/KDChartRingDiagram
deleted file mode 100644
index 346fd56..0000000
--- a/lib/libkdchart/include/KDChartRingDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartRingDiagram.h"
diff --git a/lib/libkdchart/include/KDChartRulerAttributes b/lib/libkdchart/include/KDChartRulerAttributes
deleted file mode 100644
index 25b9d77..0000000
--- a/lib/libkdchart/include/KDChartRulerAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartRulerAttributes.h"
diff --git a/lib/libkdchart/include/KDChartStockBarAttributes b/lib/libkdchart/include/KDChartStockBarAttributes
deleted file mode 100644
index fc3040d..0000000
--- a/lib/libkdchart/include/KDChartStockBarAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartStockBarAttributes.h"
diff --git a/lib/libkdchart/include/KDChartStockDiagram b/lib/libkdchart/include/KDChartStockDiagram
deleted file mode 100644
index 8c38dcb..0000000
--- a/lib/libkdchart/include/KDChartStockDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartStockDiagram.h"
diff --git a/lib/libkdchart/include/KDChartTernaryAxis b/lib/libkdchart/include/KDChartTernaryAxis
deleted file mode 100644
index 3aa19cb..0000000
--- a/lib/libkdchart/include/KDChartTernaryAxis
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/Ternary/KDChartTernaryAxis.h"
diff --git a/lib/libkdchart/include/KDChartTernaryCoordinatePlane b/lib/libkdchart/include/KDChartTernaryCoordinatePlane
deleted file mode 100644
index a5075ca..0000000
--- a/lib/libkdchart/include/KDChartTernaryCoordinatePlane
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/Ternary/KDChartTernaryCoordinatePlane.h"
diff --git a/lib/libkdchart/include/KDChartTernaryLineDiagram b/lib/libkdchart/include/KDChartTernaryLineDiagram
deleted file mode 100644
index 9b40bf1..0000000
--- a/lib/libkdchart/include/KDChartTernaryLineDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/Ternary/KDChartTernaryLineDiagram.h"
diff --git a/lib/libkdchart/include/KDChartTernaryPointDiagram b/lib/libkdchart/include/KDChartTernaryPointDiagram
deleted file mode 100644
index 89b6d97..0000000
--- a/lib/libkdchart/include/KDChartTernaryPointDiagram
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/Ternary/KDChartTernaryPointDiagram.h"
diff --git a/lib/libkdchart/include/KDChartTextAttributes b/lib/libkdchart/include/KDChartTextAttributes
deleted file mode 100644
index 872f46d..0000000
--- a/lib/libkdchart/include/KDChartTextAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartTextAttributes.h"
diff --git a/lib/libkdchart/include/KDChartThreeDBarAttributes b/lib/libkdchart/include/KDChartThreeDBarAttributes
deleted file mode 100644
index b18d577..0000000
--- a/lib/libkdchart/include/KDChartThreeDBarAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartThreeDBarAttributes.h"
diff --git a/lib/libkdchart/include/KDChartThreeDLineAttributes b/lib/libkdchart/include/KDChartThreeDLineAttributes
deleted file mode 100644
index 8451986..0000000
--- a/lib/libkdchart/include/KDChartThreeDLineAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartThreeDLineAttributes.h"
diff --git a/lib/libkdchart/include/KDChartThreeDPieAttributes b/lib/libkdchart/include/KDChartThreeDPieAttributes
deleted file mode 100644
index 6a5d8cc..0000000
--- a/lib/libkdchart/include/KDChartThreeDPieAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartThreeDPieAttributes.h"
diff --git a/lib/libkdchart/include/KDChartValueTrackerAttributes b/lib/libkdchart/include/KDChartValueTrackerAttributes
deleted file mode 100644
index 6976e0a..0000000
--- a/lib/libkdchart/include/KDChartValueTrackerAttributes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartValueTrackerAttributes.h"
diff --git a/lib/libkdchart/include/KDChartWidget b/lib/libkdchart/include/KDChartWidget
deleted file mode 100644
index f64131f..0000000
--- a/lib/libkdchart/include/KDChartWidget
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartWidget.h"
diff --git a/lib/libkdchart/include/KDChartZoomParameters b/lib/libkdchart/include/KDChartZoomParameters
deleted file mode 100644
index 9a98aab..0000000
--- a/lib/libkdchart/include/KDChartZoomParameters
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDChartZoomParameters.h"
diff --git a/lib/libkdchart/include/KDTextDocument b/lib/libkdchart/include/KDTextDocument
deleted file mode 100644
index 513c8f0..0000000
--- a/lib/libkdchart/include/KDTextDocument
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDTextDocument.h"
diff --git a/lib/libkdchart/include/ui_KDChartDatasetSelector.h b/lib/libkdchart/include/ui_KDChartDatasetSelector.h
deleted file mode 100644
index 4d8b0d2..0000000
--- a/lib/libkdchart/include/ui_KDChartDatasetSelector.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'KDChartDatasetSelector.ui'
-**
-** Created: Sat Jan 7 12:36:09 2012
-** by: Qt User Interface Compiler version 4.7.3
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef KDCHARTDATASETSELECTOR_H
-#define KDCHARTDATASETSELECTOR_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class Ui_DatasetSelector
-{
-public:
- QHBoxLayout *hboxLayout;
- QGroupBox *groupBox;
- QGridLayout *gridLayout;
- QCheckBox *cbReverseColumns;
- QLabel *label_5;
- QSpinBox *sbStartColumn;
- QLabel *label_2;
- QSpinBox *sbColumnCount;
- QLabel *label;
- QLabel *label_6;
- QSpinBox *sbStartRow;
- QLabel *label_4;
- QCheckBox *cbReverseRows;
- QLabel *label_3;
- QSpinBox *sbRowCount;
- QSpacerItem *spacerItem;
-
- void setupUi(QWidget *DatasetSelector)
- {
- if (DatasetSelector->objectName().isEmpty())
- DatasetSelector->setObjectName(QString::fromUtf8("DatasetSelector"));
- DatasetSelector->resize(728, 344);
- QSizePolicy sizePolicy(static_cast(3), static_cast(3));
- sizePolicy.setHorizontalStretch(0);
- sizePolicy.setVerticalStretch(0);
- sizePolicy.setHeightForWidth(DatasetSelector->sizePolicy().hasHeightForWidth());
- DatasetSelector->setSizePolicy(sizePolicy);
- DatasetSelector->setMinimumSize(QSize(0, 0));
- hboxLayout = new QHBoxLayout(DatasetSelector);
-#ifndef Q_OS_MAC
- hboxLayout->setSpacing(6);
-#endif
-#ifndef Q_OS_MAC
- hboxLayout->setContentsMargins(9, 9, 9, 9);
-#endif
- hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
- groupBox = new QGroupBox(DatasetSelector);
- groupBox->setObjectName(QString::fromUtf8("groupBox"));
- groupBox->setCheckable(true);
- groupBox->setChecked(false);
- gridLayout = new QGridLayout(groupBox);
-#ifndef Q_OS_MAC
- gridLayout->setSpacing(6);
-#endif
-#ifndef Q_OS_MAC
- gridLayout->setContentsMargins(9, 9, 9, 9);
-#endif
- gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
- cbReverseColumns = new QCheckBox(groupBox);
- cbReverseColumns->setObjectName(QString::fromUtf8("cbReverseColumns"));
-
- gridLayout->addWidget(cbReverseColumns, 3, 1, 1, 3);
-
- label_5 = new QLabel(groupBox);
- label_5->setObjectName(QString::fromUtf8("label_5"));
- label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
-
- gridLayout->addWidget(label_5, 3, 0, 1, 1);
-
- sbStartColumn = new QSpinBox(groupBox);
- sbStartColumn->setObjectName(QString::fromUtf8("sbStartColumn"));
-
- gridLayout->addWidget(sbStartColumn, 2, 3, 1, 1);
-
- label_2 = new QLabel(groupBox);
- label_2->setObjectName(QString::fromUtf8("label_2"));
- label_2->setAlignment(Qt::AlignCenter);
-
- gridLayout->addWidget(label_2, 2, 2, 1, 1);
-
- sbColumnCount = new QSpinBox(groupBox);
- sbColumnCount->setObjectName(QString::fromUtf8("sbColumnCount"));
-
- gridLayout->addWidget(sbColumnCount, 2, 1, 1, 1);
-
- label = new QLabel(groupBox);
- label->setObjectName(QString::fromUtf8("label"));
- label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
-
- gridLayout->addWidget(label, 2, 0, 1, 1);
-
- label_6 = new QLabel(groupBox);
- label_6->setObjectName(QString::fromUtf8("label_6"));
- label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
-
- gridLayout->addWidget(label_6, 1, 0, 1, 1);
-
- sbStartRow = new QSpinBox(groupBox);
- sbStartRow->setObjectName(QString::fromUtf8("sbStartRow"));
-
- gridLayout->addWidget(sbStartRow, 0, 3, 1, 1);
-
- label_4 = new QLabel(groupBox);
- label_4->setObjectName(QString::fromUtf8("label_4"));
- label_4->setAlignment(Qt::AlignCenter);
-
- gridLayout->addWidget(label_4, 0, 2, 1, 1);
-
- cbReverseRows = new QCheckBox(groupBox);
- cbReverseRows->setObjectName(QString::fromUtf8("cbReverseRows"));
-
- gridLayout->addWidget(cbReverseRows, 1, 1, 1, 3);
-
- label_3 = new QLabel(groupBox);
- label_3->setObjectName(QString::fromUtf8("label_3"));
- label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
-
- gridLayout->addWidget(label_3, 0, 0, 1, 1);
-
- sbRowCount = new QSpinBox(groupBox);
- sbRowCount->setObjectName(QString::fromUtf8("sbRowCount"));
-
- gridLayout->addWidget(sbRowCount, 0, 1, 1, 1);
-
- spacerItem = new QSpacerItem(169, 31, QSizePolicy::Minimum, QSizePolicy::Expanding);
-
- gridLayout->addItem(spacerItem, 4, 2, 1, 1);
-
-
- hboxLayout->addWidget(groupBox);
-
-
- retranslateUi(DatasetSelector);
-
- QMetaObject::connectSlotsByName(DatasetSelector);
- } // setupUi
-
- void retranslateUi(QWidget *DatasetSelector)
- {
- DatasetSelector->setWindowTitle(QApplication::translate("DatasetSelector", "Data Selector", 0, QApplication::UnicodeUTF8));
- groupBox->setTitle(QApplication::translate("DatasetSelector", "Only display a subset of the model in the chart:", 0, QApplication::UnicodeUTF8));
- cbReverseColumns->setText(QApplication::translate("DatasetSelector", "in reverse order.", 0, QApplication::UnicodeUTF8));
- label_5->setText(QApplication::translate("DatasetSelector", "...", 0, QApplication::UnicodeUTF8));
- label_2->setText(QApplication::translate("DatasetSelector", "columns starting at column", 0, QApplication::UnicodeUTF8));
- label->setText(QApplication::translate("DatasetSelector", "Display", 0, QApplication::UnicodeUTF8));
- label_6->setText(QApplication::translate("DatasetSelector", "...", 0, QApplication::UnicodeUTF8));
- label_4->setText(QApplication::translate("DatasetSelector", "rows starting at row", 0, QApplication::UnicodeUTF8));
- cbReverseRows->setText(QApplication::translate("DatasetSelector", "in reverse order.", 0, QApplication::UnicodeUTF8));
- label_3->setText(QApplication::translate("DatasetSelector", "Display", 0, QApplication::UnicodeUTF8));
- } // retranslateUi
-
-};
-
-namespace Ui {
- class DatasetSelector: public Ui_DatasetSelector {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // KDCHARTDATASETSELECTOR_H
diff --git a/lib/libkdchart/kdablibfakes/include/KDABLibFakes b/lib/libkdchart/kdablibfakes/include/KDABLibFakes
deleted file mode 100644
index b96bd3e..0000000
--- a/lib/libkdchart/kdablibfakes/include/KDABLibFakes
+++ /dev/null
@@ -1 +0,0 @@
-#include "../src/KDABLibFakes.h"
diff --git a/lib/libkdchart/kdablibfakes/src/KDABLibFakes.h b/lib/libkdchart/kdablibfakes/src/KDABLibFakes.h
deleted file mode 100644
index fcd1822..0000000
--- a/lib/libkdchart/kdablibfakes/src/KDABLibFakes.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDAB_LIB_FAKES_H
-#define KDAB_LIB_FAKES_H
-
-#if defined Q_OS_DARWIN
-/* On Mac OS X, ensure that will define std::isnan */
-#define _GLIBCPP_USE_C99 1
-#endif
-
-#include
-
-#ifdef Q_OS_SOLARIS
-#include
-#include
-#endif
-
-#include
-
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#define DEGTORAD(d) (d)*M_PI/180
-
-// Smybian's math.h doesn't define a trunc function
-#if defined(Q_OS_SYMBIAN) || defined(QT_SIMULATOR)
-#define trunc(x) (double) ((int) (x + (x >= 0.0 ? -0.5 : 0.5)))
-#endif
-
-// We use our own ISNAN / ISINF in the code to detect
-// that we defined them.
-// reason: Windows / MacOS do not have isnan() / isinf()
-#if defined (Q_OS_WIN) && defined(_MSC_VER)
-#include
-#define ISNAN(x ) _isnan(x )
-#define ISINF(x ) (!(_finite(x ) + _isnan(x ) ) )
-#elif defined (Q_OS_DARWIN) || defined (Q_OS_CYGWIN)
-#define ISNAN(x) std::isnan(x)
-#define ISINF(x) std::isinf(x)
-#else
-#define ISNAN(x) isnan(x)
-#define ISINF(x) isinf(x)
-#endif
-
-
-// We wrap every for() by extra { } to work around
-// the scope bug for loop counters in MS Visual C++ v6
-#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
-/* This is done in Qt41 qglobal.h but not Qt42*/
-#if QT_VERSION < 0x040200
-#define for if (0) {} else for
-#endif
-#define KDAB_FOREACH( v, c ) if (0) {} else Q_FOREACH( v, c )
-#else
-#define KDAB_FOREACH( v, c ) Q_FOREACH( v, c )
-#endif
-
-#endif
diff --git a/lib/libkdchart/src/CartesianCoordinateTransformation.h b/lib/libkdchart/src/CartesianCoordinateTransformation.h
deleted file mode 100644
index 5f3cef0..0000000
--- a/lib/libkdchart/src/CartesianCoordinateTransformation.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef CARTESIANCOORDINATETRANSFORMATION_H
-#define CARTESIANCOORDINATETRANSFORMATION_H
-
-#include
-#include
-#include
-
-#include "KDChartZoomParameters.h"
-
-#include
-#include
-
-namespace KDChart {
-
- // FIXME: if this struct is used more often, we need to make it a class
- // with proper accessor methods:
-
- /**
- * \internal
- */
- struct CoordinateTransformation {
- QRectF diagramRect;
- // represents the distance of the diagram coordinate origin to the
- // origin of the coordinate plane space:
- QPointF originTranslation;
- // make a vector base for R2:
- double unitVectorX;
- double unitVectorY;
- // implement isometric scaling:
- double isoScaleX;
- double isoScaleY;
-
- CartesianCoordinatePlane::AxesCalcMode axesCalcModeY;
- CartesianCoordinatePlane::AxesCalcMode axesCalcModeX;
-
- ZoomParameters zoom;
-
- typedef QPair< qreal, qreal > qrealPair;
-
- inline qreal makeLogarithmic( qrealPair reference, qreal value ) const
- {
- qreal result = value;
-
- qreal relation;
- if( reference.second == -1.0 )
- relation = 1.0;
- else if( reference.second == 1.0 )
- relation = 1.0;
- else if( reference.second > 0.0 )
- relation = reference.second / log10( reference.second );
- else if( result < 0.0 )
- relation = reference.second / log10( -reference.second );
- else
- relation = 10.0;
-
- if( value == 0.0 )
- result = 0.0;//std::numeric_limits< qreal >::quiet_NaN();
- else if( value > 0.0 )
- result = log10( result ) * relation;
- else if( value < 0.0 )
- result = -log10( -result ) * relation;
-
- if( value == 0.0 )
- return result;
-
- result -= log10( qAbs( reference.first ) ) * relation;
- result *= ( reference.second - reference.first ) / relation / (log10(qAbs(reference.second))-log10(qAbs(reference.first)));
- result += reference.first;
-
- if( reference.first < 0.0 )
- {
- result += reference.first;
- result -= reference.second;
- result = reference.first - result + reference.second;
-
- }
-
- return result;
- }
-
- inline QPointF translate( const QPointF& diagramPoint ) const
- {
- // ### de-inline me
- QPointF result = originTranslation;
- QPointF tempPoint = diagramPoint;
-
- const QRectF& diagRect = diagramRect;
-
- if( axesCalcModeY == CartesianCoordinatePlane::Logarithmic )
- {
- tempPoint.setY( makeLogarithmic( qrealPair( diagRect.bottom(), diagRect.y() ), tempPoint.y() ) );
- }
- if( axesCalcModeX == CartesianCoordinatePlane::Logarithmic )
- {
- tempPoint.setX( makeLogarithmic( qrealPair( diagRect.x(), diagRect.right() ), tempPoint.x() ) );
- }
-
- tempPoint.rx() += diagRect.width() / (2.0 * zoom.xFactor);
- tempPoint.ry() += diagRect.height() / (2.0 * zoom.yFactor);
-
- tempPoint.rx() -= diagRect.width() * zoom.xCenter;
- tempPoint.ry() -= diagRect.height() * zoom.yCenter;
-
- // translate: xNew = (xOld - diaX) * zoomX + diaX
- tempPoint.setX( ( tempPoint.x() - diagRect.x() ) * zoom.xFactor + diagRect.x() );
- tempPoint.setY( ( tempPoint.y() - diagRect.y() ) * zoom.yFactor + diagRect.y() );
-
- result.rx() += isoScaleX * unitVectorX * tempPoint.x();
- result.ry() += isoScaleY * unitVectorY * tempPoint.y();
-
- return result;
- }
-
- // convert screen points to value space points
- inline const QPointF translateBack( const QPointF& screenPoint ) const
- {
- qreal x, y;
-
- x = screenPoint.x() - originTranslation.x();
- y = screenPoint.y() - originTranslation.y();
-
- x /= isoScaleX * unitVectorX;
- y /= isoScaleY * unitVectorY;
-
- // translate back: xOld = DiaX + (xNew - DiaX) / zoomX
- x = diagramRect.x() + (x - diagramRect.x()) / zoom.xFactor;
- y = diagramRect.y() + (y - diagramRect.y()) / zoom.yFactor;
-
- x += diagramRect.width() * zoom.xCenter;
- y += diagramRect.height() * zoom.yCenter;
-
- x -= diagramRect.width() / (2.0 * zoom.xFactor);
- y -= diagramRect.height() / (2.0 * zoom.yFactor);
-
- /*
- if ( axesCalcModeY == CartesianCoordinatePlane::Logarithmic ){
- tempPoint.setY( makeLogarithmic( diagramRect.y(), tempPoint.y() ) );
- //qDebug() << "Y: " << tempPoint.y();
- }
- if ( axesCalcModeX == CartesianCoordinatePlane::Logarithmic ){
- //qDebug() << "X diagramRect.x(): " << diagramRect.x();
- //qDebug() << "X tempPoint old: " << tempPoint;
- tempPoint.setX( makeLogarithmic( diagramRect.width(), tempPoint.x() ) );
- //qDebug() << "X tempPoint new: " << tempPoint;
- }
-// qDebug() << "CoordinateTransformation::translate() using diagramRect: "
-// << diagramRect.x() << diagramRect.y() << diagramRect.width() << diagramRect.height();
- */
-
- return QPointF(x, y);
- }
-
- };
-
- typedef QList CoordinateTransformationList;
-
-}
-
-#endif
-
diff --git a/lib/libkdchart/src/KDChartAbstractArea.cpp b/lib/libkdchart/src/KDChartAbstractArea.cpp
deleted file mode 100644
index 95732a6..0000000
--- a/lib/libkdchart/src/KDChartAbstractArea.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractArea.h"
-#include "KDChartAbstractArea_p.h"
-
-#include
-
-#include
-#include
-
-#include
-
-
-using namespace KDChart;
-
-#define d (d_func())
-
-AbstractArea::Private::Private() :
- AbstractAreaBase::Private()
-{
- // this bloc left empty intentionally
-}
-
-
-AbstractArea::Private::~Private()
-{
- // this bloc left empty intentionally
-}
-
-
-AbstractArea::AbstractArea()
- : QObject()
- , KDChart::AbstractAreaBase()
- , KDChart::AbstractLayoutItem()
-{
- init();
-}
-
-AbstractArea::~AbstractArea()
-{
- // this bloc left empty intentionally
-}
-
-
-void AbstractArea::init()
-{
- d->amountOfLeftOverlap = 0;
- d->amountOfRightOverlap = 0;
- d->amountOfTopOverlap = 0;
- d->amountOfBottomOverlap = 0;
-}
-
-
-int AbstractArea::leftOverlap( bool doNotRecalculate ) const
-{
- // Re-calculate the sizes,
- // so we also get the amountOf..Overlap members set newly:
- if( ! doNotRecalculate )
- sizeHint();
- return d->amountOfLeftOverlap;
-}
-int AbstractArea::rightOverlap( bool doNotRecalculate ) const
-{
- // Re-calculate the sizes,
- // so we also get the amountOf..Overlap members set newly:
- if( ! doNotRecalculate )
- sizeHint();
- return d->amountOfRightOverlap;
-}
-int AbstractArea::topOverlap( bool doNotRecalculate ) const
-{
- // Re-calculate the sizes,
- // so we also get the amountOf..Overlap members set newly:
- if( ! doNotRecalculate )
- sizeHint();
- return d->amountOfTopOverlap;
-}
-int AbstractArea::bottomOverlap( bool doNotRecalculate ) const
-{
- // Re-calculate the sizes,
- // so we also get the amountOf..Overlap members set newly:
- if( ! doNotRecalculate )
- sizeHint();
- return d->amountOfBottomOverlap;
-}
-
-
-void AbstractArea::paintIntoRect( QPainter& painter, const QRect& rect )
-{
- const QRect oldGeometry( geometry() );
- if( oldGeometry != rect )
- setGeometry( rect );
- painter.translate( rect.left(), rect.top() );
- paintAll( painter );
- painter.translate( -rect.left(), -rect.top() );
- if( oldGeometry != rect )
- setGeometry( oldGeometry );
-}
-
-void AbstractArea::paintAll( QPainter& painter )
-{
- // Paint the background and frame
- const QRect overlappingArea( geometry().adjusted(
- -d->amountOfLeftOverlap,
- -d->amountOfTopOverlap,
- d->amountOfRightOverlap,
- d->amountOfBottomOverlap ) );
- paintBackground( painter, overlappingArea );
- paintFrame( painter, overlappingArea );
-
- // temporarily adjust the widget size, to be sure all content gets calculated
- // to fit into the inner rectangle
- const QRect oldGeometry( areaGeometry() );
- QRect inner( innerRect() );
- inner.moveTo(
- oldGeometry.left() + inner.left(),
- oldGeometry.top() + inner.top() );
- const bool needAdjustGeometry = oldGeometry != inner;
- if( needAdjustGeometry )
- setGeometry( inner );
- paint( &painter );
- if( needAdjustGeometry )
- setGeometry( oldGeometry );
- //qDebug() << "AbstractAreaWidget::paintAll() done.";
-}
-
-QRect AbstractArea::areaGeometry() const
-{
- return geometry();
-}
-
-void AbstractArea::positionHasChanged()
-{
- emit positionChanged( this );
-}
-
diff --git a/lib/libkdchart/src/KDChartAbstractArea.h b/lib/libkdchart/src/KDChartAbstractArea.h
deleted file mode 100644
index 7c1cb90..0000000
--- a/lib/libkdchart/src/KDChartAbstractArea.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREA_H
-#define KDCHARTABSTRACTAREA_H
-
-#include
-
-#include "KDChartGlobal.h"
-#include "KDChartAbstractAreaBase.h"
-#include "KDChartLayoutItems.h"
-
-namespace KDChart {
-
-
-/**
- * @class AbstractArea KDChartAbstractArea.h
- * @brief An area in the chart with a background, a frame, etc.
- *
- * AbstractArea is the base class for all non-widget chart elements that have
- * a set of background attributes and frame attributes, such as
- * coordinate planes or axes.
- *
- * @note This class inherits from AbstractAreaBase, AbstractLayoutItem, QObject.
- * The reason for this tripple inheritance is that neither AbstractAreaBase nor
- * AbstractLayoutItem are QObject.
- */
-class KDCHART_EXPORT AbstractArea : public QObject,
- public AbstractAreaBase,
- public AbstractLayoutItem
-{
- Q_OBJECT
-
- Q_DISABLE_COPY( AbstractArea )
- KDCHART_DECLARE_PRIVATE_DERIVED( AbstractArea )
-
-
-public:
- virtual ~AbstractArea() ;
-
-// virtual AbstractArea * clone() const = 0;
- /**
- * @brief Draws the background and frame, then calls paint().
- *
- * In most cases there is no need to overwrite this method in a derived
- * class, but you would overwrite AbstractLayoutItem::paint() instead.
- */
- virtual void paintIntoRect( QPainter& painter, const QRect& rect );
-
- /**
- * Call paintAll, if you want the background and the frame to be drawn
- * before the normal paint() is invoked automatically.
- */
- virtual void paintAll( QPainter& painter );
-
- /**
- * This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
- *
- * The method triggers AbstractArea::sizeHint() to find out the
- * amount of overlap at the left edge of the area.
- *
- * \note The default implementation is not using any caching,
- * it might make sense to implement a more sophisticated solution
- * for derived classes that have complex work to do in sizeHint().
- * All we have here is a primitive flag to be set by the caller
- * if it is sure that no sizeHint() needs to be called.
- */
- virtual int leftOverlap( bool doNotRecalculate=false ) const;
- /**
- * This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
- *
- * The method triggers AbstractArea::sizeHint() to find out the
- * amount of overlap at the right edge of the area.
- *
- * \note The default implementation is not using any caching,
- * it might make sense to implement a more sophisticated solution
- * for derived classes that have complex work to do in sizeHint().
- * All we have here is a primitive flag to be set by the caller
- * if it is sure that no sizeHint() needs to be called.
- */
- virtual int rightOverlap( bool doNotRecalculate=false ) const;
- /**
- * This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
- *
- * The method triggers AbstractArea::sizeHint() to find out the
- * amount of overlap at the top edge of the area.
- *
- * \note The default implementation is not using any caching,
- * it might make sense to implement a more sophisticated solution
- * for derived classes that have complex work to do in sizeHint().
- * All we have here is a primitive flag to be set by the caller
- * if it is sure that no sizeHint() needs to be called.
- */
- virtual int topOverlap( bool doNotRecalculate=false ) const;
- /**
- * This is called at layout time by KDChart:AutoSpacerLayoutItem::sizeHint().
- *
- * The method triggers AbstractArea::sizeHint() to find out the
- * amount of overlap at the bottom edge of the area.
- *
- * \note The default implementation is not using any caching,
- * it might make sense to implement a more sophisticated solution
- * for derived classes that have complex work to do in sizeHint().
- * All we have here is a primitive flag to be set by the caller
- * if it is sure that no sizeHint() needs to be called.
- */
- virtual int bottomOverlap( bool doNotRecalculate=false ) const;
-
-protected:
- AbstractArea();
- virtual QRect areaGeometry() const;
- virtual void positionHasChanged();
-
-Q_SIGNALS:
- void positionChanged( AbstractArea * );
-
- //KDCHART_DECLARE_PRIVATE_DERIVED(AbstractArea)
-}; // End of class AbstractArea
-
-}
-#endif // KDCHARTABSTRACTAREA_H
diff --git a/lib/libkdchart/src/KDChartAbstractAreaBase.cpp b/lib/libkdchart/src/KDChartAbstractAreaBase.cpp
deleted file mode 100644
index eb602fc..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaBase.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractAreaBase.h"
-#include "KDChartAbstractAreaBase_p.h"
-#include
-#include
-#include
-#include "KDChartPainterSaver_p.h"
-#include "KDChartPrintingParameters.h"
-#include
-
-#include
-
-
-using namespace KDChart;
-
-AbstractAreaBase::Private::Private() :
- visible( true )
- // PENDING(khz) dockingPointToPadding?, alignToDockingPoint?
-{
- init();
-}
-
-
-AbstractAreaBase::Private::~Private() {}
-
-
-void AbstractAreaBase::Private::init()
-{
-}
-
-
-
-
-AbstractAreaBase::AbstractAreaBase() :
- _d( new Private() )
-{
-}
-
-AbstractAreaBase::~AbstractAreaBase()
-{
- delete _d; _d = 0;
-}
-
-
-void AbstractAreaBase::init()
-{
-}
-
-
-#define d d_func()
-
-bool AbstractAreaBase::compare( const AbstractAreaBase* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "CartesianAxis::compare() cannot compare to Null pointer";
- return false;
- }
- /*
- qDebug() << "AbstractAreaBase:" << (frameAttributes() == other->frameAttributes())
- << (backgroundAttributes() == other->backgroundAttributes()) << "\n";
- */
- return (frameAttributes() == other->frameAttributes()) &&
- (backgroundAttributes() == other->backgroundAttributes());
-}
-
-void AbstractAreaBase::alignToReferencePoint( const RelativePosition& position )
-{
- Q_UNUSED( position );
- // PENDING(kalle) FIXME
- qWarning( "Sorry, not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosition& position )" );
-}
-
-void AbstractAreaBase::setFrameAttributes( const FrameAttributes &a )
-{
- if( d->frameAttributes == a )
- return;
-
- d->frameAttributes = a;
- positionHasChanged();
-}
-
-FrameAttributes AbstractAreaBase::frameAttributes() const
-{
- return d->frameAttributes;
-}
-
-void AbstractAreaBase::setBackgroundAttributes( const BackgroundAttributes &a )
-{
- if( d->backgroundAttributes == a )
- return;
-
- d->backgroundAttributes = a;
- positionHasChanged();
-}
-
-BackgroundAttributes AbstractAreaBase::backgroundAttributes() const
-{
- return d->backgroundAttributes;
-}
-
-
-/* static */
-void AbstractAreaBase::paintBackgroundAttributes( QPainter& painter, const QRect& rect,
- const KDChart::BackgroundAttributes& attributes )
-{
- if( !attributes.isVisible() ) return;
-
- /* first draw the brush (may contain a pixmap)*/
- if( Qt::NoBrush != attributes.brush().style() ) {
- KDChart::PainterSaver painterSaver( &painter );
- painter.setPen( Qt::NoPen );
- const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );
- painter.setBrushOrigin( newTopLeft );
- painter.setBrush( attributes.brush() );
- painter.drawRect( rect.adjusted( 0, 0, -1, -1 ) );
- }
- /* next draw the backPixmap over the brush */
- if( !attributes.pixmap().isNull() &&
- attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {
- QPointF ol = rect.topLeft();
- if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )
- {
- ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );
- ol.setY( rect.center().y() - attributes.pixmap().height()/ 2 );
- painter.drawPixmap( ol, attributes.pixmap() );
- } else {
- QMatrix m;
- double zW = (double)rect.width() / (double)attributes.pixmap().width();
- double zH = (double)rect.height() / (double)attributes.pixmap().height();
- switch( attributes.pixmapMode() ) {
- case BackgroundAttributes::BackgroundPixmapModeScaled:
- {
- double z;
- z = qMin( zW, zH );
- m.scale( z, z );
- }
- break;
- case BackgroundAttributes::BackgroundPixmapModeStretched:
- m.scale( zW, zH );
- break;
- default:
- ; // Cannot happen, previously checked
- }
- QPixmap pm = attributes.pixmap().transformed( m );
- ol.setX( rect.center().x() - pm.width() / 2 );
- ol.setY( rect.center().y() - pm.height()/ 2 );
- painter.drawPixmap( ol, pm );
- }
- }
-}
-
-/* static */
-void AbstractAreaBase::paintFrameAttributes( QPainter& painter, const QRect& rect,
- const KDChart::FrameAttributes& attributes )
-{
-
- if( !attributes.isVisible() ) return;
-
- // Note: We set the brush to NoBrush explicitly here.
- // Otherwise we might get a filled rectangle, so any
- // previously drawn background would be overwritten by that area.
-
- const QPen oldPen( painter.pen() );
- const QBrush oldBrush( painter.brush() );
- painter.setPen( PrintingParameters::scalePen( attributes.pen() ) );
- painter.setBrush( Qt::NoBrush );
- painter.drawRect( rect.adjusted( 0, 0, -1, -1 ) );
- painter.setBrush( oldBrush );
- painter.setPen( oldPen );
-}
-
-void AbstractAreaBase::paintBackground( QPainter& painter, const QRect& rect )
-{
- Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",
- "Private class was not initialized!" );
- paintBackgroundAttributes( painter, rect, d->backgroundAttributes );
-}
-
-
-void AbstractAreaBase::paintFrame( QPainter& painter, const QRect& rect )
-{
- Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",
- "Private class was not initialized!" );
- paintFrameAttributes( painter, rect, d->frameAttributes );
-}
-
-
-void AbstractAreaBase::getFrameLeadings(int& left, int& top, int& right, int& bottom ) const
-{
- if( d && d->frameAttributes.isVisible() ){
- const int padding = qMax( d->frameAttributes.padding(), 0 );
- left = padding;
- top = padding;
- right = padding;
- bottom = padding;
- }else{
- left = 0;
- top = 0;
- right = 0;
- bottom = 0;
- }
-}
-
-QRect AbstractAreaBase::innerRect() const
-{
- int left;
- int top;
- int right;
- int bottom;
- getFrameLeadings( left, top, right, bottom );
- return
- QRect( QPoint(0,0), areaGeometry().size() )
- .adjusted( left, top, -right, -bottom );
-}
-
-void AbstractAreaBase::positionHasChanged()
-{
- // this bloc left empty intentionally
-}
-
diff --git a/lib/libkdchart/src/KDChartAbstractAreaBase.h b/lib/libkdchart/src/KDChartAbstractAreaBase.h
deleted file mode 100644
index 49a3957..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaBase.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREABASE_H
-#define KDCHARTABSTRACTAREABASE_H
-
-#include
-#include
-#include
-
-#include "KDChartGlobal.h"
-#include "KDChartLayoutItems.h"
-#include "KDChartRelativePosition.h"
-#include "KDChartAbstractAreaBase.h"
-
-
-class QPainter;
-class QString;
-namespace KDChart {
- class TextAttributes;
- class BackgroundAttributes;
- class FrameAttributes;
- class PaintContext;
-
-
-/**
- * @class AbstractAreaBase KDChartAbstractAreaBase.h
- * @brief Base class for AbstractArea and AbstractAreaWidget: An area
- * in the chart with a background, a frame, etc.
- *
- * AbstractAreaBase is the base class for all chart elements that have
- * a set of background attributes and frame attributes, such as
- * legends or axes.
- *
- * @note Normally you should not use AbstractAreaBase directly, but
- * derive your classes from AbstractArea or AbstractAreaWidget.
- *
- * @note This classis not a QObject, so it is easier to inherit from
- * it, if your are inheriting from a QObject too like AbstractAreaWidget does it.
- *
- * @sa AbstractArea, AbstractAreaWidget
- */
-class KDCHART_EXPORT AbstractAreaBase
-{
- Q_DISABLE_COPY( AbstractAreaBase )
- KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC( AbstractAreaBase )
-
-protected:
- AbstractAreaBase();
- virtual ~AbstractAreaBase() ;
-
-public:
-// virtual AbstractAreaBase * clone() const = 0;
-
- /**
- * Returns true if both areas have the same settings.
- */
- bool compare( const AbstractAreaBase* other )const;
-
- void alignToReferencePoint( const RelativePosition& position );
-
- void setFrameAttributes( const FrameAttributes &a );
- FrameAttributes frameAttributes() const;
-
- void setBackgroundAttributes( const BackgroundAttributes &a );
- BackgroundAttributes backgroundAttributes() const;
-
- virtual void paintBackground( QPainter& painter, const QRect& rectangle );
- virtual void paintFrame( QPainter& painter, const QRect& rectangle );
-
- static void paintBackgroundAttributes( QPainter& painter, const QRect& rectangle,
- const KDChart::BackgroundAttributes& attributes );
- static void paintFrameAttributes( QPainter& painter, const QRect& rectangle,
- const KDChart::FrameAttributes& attributes );
-
- /** \internal
- * \note Normally you should not call this method, but derive your classes
- * from AbstractArea or AbstractAreaWidget.
- * \sa AbstractArea, AbstractAreaWidget
- */
- void getFrameLeadings(int& left, int& top, int& right, int& bottom ) const;
-
-
-protected:
- /** \internal
- * \note Normally you should not call this method, but derive your classes
- * from AbstractArea or AbstractAreaWidget.
- * \sa AbstractArea, AbstractAreaWidget
- */
- QRect innerRect() const;
-
- /** \internal
- * This internal method is used by AbstractArea and AbstractAreaWidget
- * to find out the real widget size.
- * \sa AbstractArea, AbstractAreaWidget
- */
- virtual QRect areaGeometry() const = 0;
-
- /** \internal
- * This internal method can be overwritten by derived classes,
- * if they want to emit a signal (or perform other actions, resp.)
- * when the Position of the area has been changed.
- * The default implementation does nothing.
- */
- virtual void positionHasChanged();
-
-}; // End of class AbstractAreaBase
-
-}
-#endif // KDCHARTABSTRACTAREABASE_H
diff --git a/lib/libkdchart/src/KDChartAbstractAreaBase_p.h b/lib/libkdchart/src/KDChartAbstractAreaBase_p.h
deleted file mode 100644
index 1caaf51..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaBase_p.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREABASE_P_H
-#define KDCHARTABSTRACTAREABASE_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-/** \file KDChartAbstractAreaBase_p.h
- * \internal
- */
-
-#include "KDChartAbstractAreaBase.h"
-#include "KDChartTextAttributes.h"
-#include "KDChartFrameAttributes.h"
-#include "KDChartBackgroundAttributes.h"
-
-#include
-
-
-namespace KDChart {
-
-/**
- * \internal
- */
- class AbstractAreaBase::Private
- {
- friend class AbstractAreaBase;
- public:
- explicit Private();
- virtual ~Private();
-
- Private( const Private& rhs ) :
- visible( rhs.visible ),
- frameAttributes( rhs.frameAttributes ),
- backgroundAttributes( rhs.backgroundAttributes )
- {
- }
-
- protected:
- void init();
-
- // These are set each time the area's sizeHint()
- // (or the maximumSize(), resp.) is calculated:
- // They store additional layout-information about
- // space needed around the area.
- // Other classes (e.g. KDChart::AutoSpacer) can use
- // these data to determine how much space has to
- // be added additionally ...
- mutable int amountOfLeftOverlap;
- mutable int amountOfRightOverlap;
- mutable int amountOfTopOverlap;
- mutable int amountOfBottomOverlap;
-
- private:
- bool visible;
- KDChart::FrameAttributes frameAttributes;
- KDChart::BackgroundAttributes backgroundAttributes;
- };
-
- inline AbstractAreaBase::AbstractAreaBase( AbstractAreaBase::Private * p ) :
- _d( p ) { init(); }
-
-}
-#endif /* KDCHARTABSTRACTAREABASE_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractAreaWidget.cpp b/lib/libkdchart/src/KDChartAbstractAreaWidget.cpp
deleted file mode 100644
index 537e30c..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaWidget.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractAreaWidget.h"
-#include "KDChartAbstractAreaWidget_p.h"
-
-#include
-
-
-using namespace KDChart;
-
-
-AbstractAreaWidget::Private::Private()
-{
- // this block left empty intentionally
-}
-
-AbstractAreaWidget::Private::~Private()
-{
- // this block left empty intentionally
-}
-
-
-void AbstractAreaWidget::Private::resizeLayout(
- AbstractAreaWidget* widget, const QSize& size )
-{
- if( size == currentLayoutSize ) return;
-
- currentLayoutSize = size;
-
- // Now we call adjust the size, for the inner parts of the widget.
- int left;
- int top;
- int right;
- int bottom;
- widget->getFrameLeadings( left, top, right, bottom );
- const QSize innerSize( size.width() - left - right,
- size.height() - top - bottom );
- // With this adjusted size we call the real resizeLayout method,
- // which normally will call resizeLayout( size ) in the derived class
- // - which in turn is the place to resize the layout member variable
- // of that class.
- widget->resizeLayout( innerSize );
-}
-
-
-AbstractAreaWidget::AbstractAreaWidget( QWidget* parent )
- : QWidget( parent )
- , AbstractAreaBase( new Private() )
-{
- init();
-}
-
-AbstractAreaWidget::~AbstractAreaWidget()
-{
- // this block left empty intentionally
-}
-
-void AbstractAreaWidget::init()
-{
- // this block left empty intentionally
-}
-
-void AbstractAreaWidget::needSizeHint()
-{
- // this block left empty intentionally
-}
-
-#define d d_func()
-
-void AbstractAreaWidget::resizeLayout( const QSize& size )
-{
- Q_UNUSED( size );
- // this block left empty intentionally
-}
-
-void AbstractAreaWidget::paintEvent( QPaintEvent* event )
-{
- Q_UNUSED( event );
- QPainter painter( this );
- if( size() != d->currentLayoutSize ){
- d->resizeLayout( this, size() );
- }
- paintAll( painter );
-}
-
-void AbstractAreaWidget::paintIntoRect( QPainter& painter, const QRect& rect )
-{
- //qDebug() << "AbstractAreaWidget::paintIntoRect() called rect=" << rect;
-
- if( rect.isEmpty() ) return;
-
- d->resizeLayout( this, rect.size() );
-
- const QPoint translation( rect.topLeft() );
- painter.translate( translation );
- paintAll( painter );
- painter.translate( -translation.x(), -translation.y() );
-
-/*
- // make sure, the contents of the widget have been set up,
- // so we get a useful geometry:
- needSizeHint();
-
- const QRect oldGeometry( layout()->geometry() );
- const QRect newGeo( QPoint(0,0), rect.size() );
- const bool mustChangeGeo = layout() && oldGeometry != newGeo;
- if( mustChangeGeo )
- layout()->setGeometry( newGeo );
- painter.translate( rect.left(), rect.top() );
- paintAll( painter );
- painter.translate( -rect.left(), -rect.top() );
- if( mustChangeGeo )
- layout()->setGeometry( oldGeometry );
-*/
-}
-
-void AbstractAreaWidget::forceRebuild()
-{
- //bloc left empty intentionally
-}
-
-void AbstractAreaWidget::paintAll( QPainter& painter )
-{
- //qDebug() << "AbstractAreaWidget::paintAll() called";
-
- // Paint the background and frame
- paintBackground( painter, QRect(QPoint(0, 0), size() ) );
- paintFrame( painter, QRect(QPoint(0, 0), size() ) );
-
-/*
- we do not call setContentsMargins() now,
- but we call resizeLayout() whenever the size or the frame has changed
-
- // adjust the widget's content margins,
- // to be sure all content gets calculated
- // to fit into the inner rectangle
- const QRect oldGeometry( areaGeometry() );
- const QRect inner( innerRect() );
- //qDebug() << "areaGeometry():" << oldGeometry
- // << " contentsRect():" << contentsRect() << " inner:" << inner;
- if( contentsRect() != inner ){
- //qDebug() << "old contentsRect():" << contentsRect() << " new innerRect:" << inner;
- setContentsMargins(
- inner.left(),
- inner.top(),
- oldGeometry.width() -inner.width()-1,
- oldGeometry.height()-inner.height()-1 );
- //forceRebuild();
- }
-*/
- int left;
- int top;
- int right;
- int bottom;
- getFrameLeadings( left, top, right, bottom );
- const QPoint translation( left, top );
- painter.translate( translation );
- paint( &painter );
- painter.translate( -translation.x(), -translation.y() );
- //qDebug() << "AbstractAreaWidget::paintAll() done.";
-}
-
-QRect AbstractAreaWidget::areaGeometry() const
-{
- return geometry();
-}
-
-void AbstractAreaWidget::positionHasChanged()
-{
- emit positionChanged( this );
-}
-/*
-void AbstractAreaWidget::setGeometry( const QRect & rect )
-{
- qDebug() << "AbstractAreaWidget::setGeometry("<< rect << ") called";
- const bool bChanged = rect != geometry();
- QWidget::setGeometry( rect );
- if( bChanged )
- forceRebuild();
-}
-*/
diff --git a/lib/libkdchart/src/KDChartAbstractAreaWidget.h b/lib/libkdchart/src/KDChartAbstractAreaWidget.h
deleted file mode 100644
index 554b786..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaWidget.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREAWIDGET_H
-#define KDCHARTABSTRACTAREAWIDGET_H
-
-#include
-#include
-#include
-#include
-
-#include "KDChartAbstractAreaBase.h"
-
-namespace KDChart {
-
-
-/**
- * @class AbstractAreaWidget KDChartAbstractArea.h
- * @brief An area in the chart with a background, a frame, etc.
- *
- * AbstractAreaWidget is the base for all widget classes that have
- * a set of background attributes and frame attributes, such as
- * KDChart::Chart and KDChart::Legend.
- */
-class KDCHART_EXPORT AbstractAreaWidget : public QWidget, public AbstractAreaBase
-{
- Q_OBJECT
-
- Q_DISABLE_COPY( AbstractAreaWidget )
- KDCHART_DECLARE_PRIVATE_DERIVED_QWIDGET( AbstractAreaWidget )
-
-public:
- explicit AbstractAreaWidget( QWidget* parent = 0 );
-
- /**
- * @brief Draws the background and frame, then calls paint().
- *
- * In most cases there is no need to overwrite this method in a derived
- * class, but you would overwrite paint() instead.
- * @sa paint
- */
- virtual void paintEvent( QPaintEvent* event );
-
- /**
- * @brief Draws the background and frame, then calls paint().
- *
- * In most cases there is no need to overwrite this method in a derived
- * class, but you would overwrite paint() instead.
- */
- virtual void paintIntoRect( QPainter& painter, const QRect& rect );
-
- /**
- * Overwrite this to paint the inner contents of your widget.
- *
- * @note When overriding this method, please let your widget draw
- * itself at the top/left corner of the painter. You should call rect()
- * (or width(), height(), resp.) to find the drawable area's size:
- * While the paint() method is being executed the frame of the widget
- * is outside of its rect(), so you can use all of rect() for
- * your custom drawing!
- * @sa paint, paintIntoRect
- */
- virtual void paint( QPainter* painter ) = 0;
-
- /**
- * Call paintAll, if you want the background and the frame to be drawn
- * before the normal paint() is invoked automatically.
- */
- void paintAll( QPainter& painter );
-
- /**
- * Call this to trigger an unconditional re-building of the widget's internals.
- */
- virtual void forceRebuild();
-
- /**
- * Call this to trigger an conditional re-building of the widget's internals.
- *
- * e.g. AbstractAreaWidget call this, before calling layout()->setGeometry()
- */
- virtual void needSizeHint();
- //virtual void setGeometry( const QRect & rect );
- virtual void resizeLayout( const QSize& );
-
-protected:
- virtual ~AbstractAreaWidget() ;
- virtual QRect areaGeometry() const;
- virtual void positionHasChanged();
-
-
-public:
-// virtual AbstractAreaWidget * clone() const = 0;
-
-Q_SIGNALS:
- void positionChanged( AbstractAreaWidget * );
-
-}; // End of class AbstractAreaWidget
-
-}
-#endif // KDCHARTABSTRACTAREAWIDGET_H
diff --git a/lib/libkdchart/src/KDChartAbstractAreaWidget_p.h b/lib/libkdchart/src/KDChartAbstractAreaWidget_p.h
deleted file mode 100644
index a0a0ce5..0000000
--- a/lib/libkdchart/src/KDChartAbstractAreaWidget_p.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREAWIDGET_P_H
-#define KDCHARTABSTRACTAREAWIDGET_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-/** \file KDChartAbstractAreaWidget_p.h
- * \internal
- */
-
-#include "KDChartAbstractAreaWidget.h"
-#include "KDChartAbstractAreaBase_p.h"
-
-#include
-
-
-namespace KDChart {
-
-/**
- * \internal
- */
-class AbstractAreaWidget::Private : public AbstractAreaBase::Private
-{
- friend class AbstractAreaWidget;
-public:
- explicit Private();
- virtual ~Private();
-
- Private( const Private& rhs ) :
- AbstractAreaBase::Private( rhs )
- {
- // Just for consistency
- }
-
- QSize currentLayoutSize;
-
- // non-virtual method, calling widget->resizeLayout( size )
- void resizeLayout( AbstractAreaWidget* widget, const QSize& sz );
-};
-
-
-inline AbstractAreaWidget::AbstractAreaWidget( AbstractAreaWidget::Private * p, QWidget* parent )
- : QWidget( parent ), AbstractAreaBase( p )
-{
- init();
-}
-inline AbstractAreaWidget::Private * AbstractAreaWidget::d_func()
-{
- return static_cast( AbstractAreaBase::d_func() );
-}
-inline const AbstractAreaWidget::Private * AbstractAreaWidget::d_func() const
-{
- return static_cast( AbstractAreaBase::d_func() );
-}
-
-
-}
-
-#endif /* KDCHARTABSTRACTAREAWIDGET_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractArea_p.h b/lib/libkdchart/src/KDChartAbstractArea_p.h
deleted file mode 100644
index 9504e09..0000000
--- a/lib/libkdchart/src/KDChartAbstractArea_p.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAREA_P_H
-#define KDCHARTABSTRACTAREA_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-/** \file KDChartAbstractArea_p.h
- * \internal
- */
-
-#include "KDChartAbstractArea.h"
-#include "KDChartAbstractAreaBase_p.h"
-
-#include
-
-
-namespace KDChart {
-
-/**
- * \internal
- */
-class AbstractArea::Private : public AbstractAreaBase::Private
-{
- friend class AbstractArea;
-public:
- explicit Private();
- virtual ~Private();
-};
-
-
-inline AbstractArea::AbstractArea( Private * p )
- : QObject(), AbstractAreaBase( p ), AbstractLayoutItem()
-{
- init();
-}
-inline AbstractArea::Private * AbstractArea::d_func()
-{
- return static_cast( AbstractAreaBase::d_func() );
-}
-inline const AbstractArea::Private * AbstractArea::d_func() const
-{
- return static_cast( AbstractAreaBase::d_func() );
-}
-
-}
-
-#endif /* KDCHARTABSTRACTAREA_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractAxis.cpp b/lib/libkdchart/src/KDChartAbstractAxis.cpp
deleted file mode 100644
index 857fb31..0000000
--- a/lib/libkdchart/src/KDChartAbstractAxis.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractAxis.h"
-#include "KDChartAbstractAxis_p.h"
-#include "KDChartAbstractDiagram.h"
-#include "KDChartAbstractCartesianDiagram.h"
-#include "KDChartEnums.h"
-#include "KDChartMeasure.h"
-
-#include
-
-#include
-
-using namespace KDChart;
-
-#define d d_func()
-
-AbstractAxis::Private::Private( AbstractDiagram* diagram, AbstractAxis* axis )
- : observer( 0 )
- , mDiagram( diagram )
- , mAxis( axis )
-{
- // Note: We do NOT call setDiagram( diagram, axis );
- // but it is called in AbstractAxis::delayedInit() instead!
-}
-
-AbstractAxis::Private::~Private()
-{
- delete observer;
- observer = 0;
-}
-
-bool AbstractAxis::Private::setDiagram(
- AbstractDiagram* diagram_,
- bool delayedInit )
-{
- AbstractDiagram* diagram = delayedInit ? mDiagram : diagram_;
- if( delayedInit ){
- mDiagram = 0;
- }
-
- // do not set a diagram again that was already set
- if ( diagram &&
- ((diagram == mDiagram) || secondaryDiagrams.contains( diagram )) )
- return false;
-
- bool bNewDiagramStored = false;
- if ( ! mDiagram ) {
- mDiagram = diagram;
- delete observer;
- if ( mDiagram ) {
-//qDebug() << "axis" << (axis != 0);
- observer = new DiagramObserver( mDiagram, mAxis );
- bNewDiagramStored = true;
- }else{
- observer = 0;
- }
- } else {
- if ( diagram )
- secondaryDiagrams.enqueue( diagram );
- }
- return bNewDiagramStored;
-}
-
-void AbstractAxis::Private::unsetDiagram( AbstractDiagram* diagram )
-{
- if ( diagram == mDiagram ) {
- mDiagram = 0;
- delete observer;
- observer = 0;
- } else {
- secondaryDiagrams.removeAll( diagram );
- }
- if( !secondaryDiagrams.isEmpty() ) {
- AbstractDiagram *nextDiagram = secondaryDiagrams.dequeue();
- setDiagram( nextDiagram );
- }
-}
-
-bool AbstractAxis::Private::hasDiagram( AbstractDiagram* diagram ) const
-{
- return diagram == mDiagram || secondaryDiagrams.contains( diagram );
-}
-
-AbstractAxis::AbstractAxis ( AbstractDiagram* diagram )
- : AbstractArea( new Private( diagram, this ) )
-{
- init();
- QTimer::singleShot(0, this, SLOT(delayedInit()));
-}
-
-AbstractAxis::~AbstractAxis()
-{
- d->mDiagram = 0;
- d->secondaryDiagrams.clear();
-}
-
-
-void AbstractAxis::init()
-{
- Measure m(
- 12.5,
- KDChartEnums::MeasureCalculationModeAuto,
- KDChartEnums::MeasureOrientationAuto );
- d->textAttributes.setFontSize( m );
- m.setValue( 5 );
- m.setCalculationMode( KDChartEnums::MeasureCalculationModeAbsolute );
- d->textAttributes.setMinimalFontSize( m );
-}
-
-void AbstractAxis::delayedInit()
-{
- // We call setDiagram() here, because the c'tor of Private
- // only has stored the pointers, but it did not call setDiagram().
- if( d )
- d->setDiagram( 0, true /* delayedInit */ );
-}
-
-bool AbstractAxis::compare( const AbstractAxis* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "CartesianAxis::compare() cannot compare to Null pointer";
- return false;
- }
- /*
- qDebug() << (textAttributes() == other->textAttributes());
- qDebug() << (labels() == other->labels());
- qDebug() << (shortLabels() == other->shortLabels());
- */
- return ( static_cast(this)->compare( other ) ) &&
- (textAttributes() == other->textAttributes()) &&
- (labels() == other->labels()) &&
- (shortLabels() == other->shortLabels());
-}
-
-
-const QString AbstractAxis::customizedLabel( const QString& label )const
-{
- return label;
-}
-
-
-void AbstractAxis::createObserver( AbstractDiagram* diagram )
-{
- if( d->setDiagram( diagram ) )
- connectSignals();
-}
-
-void AbstractAxis::deleteObserver( AbstractDiagram* diagram )
-{
- d->unsetDiagram( diagram );
-}
-
-void AbstractAxis::connectSignals()
-{
- if( d->observer ){
- connect( d->observer, SIGNAL( diagramDataChanged( AbstractDiagram *) ),
- this, SLOT( update() ) );
- }
-}
-
-
-void AbstractAxis::setTextAttributes( const TextAttributes &a )
-{
- if( d->textAttributes == a )
- return;
-
- d->textAttributes = a;
- update();
-}
-
-TextAttributes AbstractAxis::textAttributes() const
-{
- return d->textAttributes;
-}
-
-
-void AbstractAxis::setRulerAttributes( const RulerAttributes &a )
-{
- d->rulerAttributes = a;
- update();
-}
-
-RulerAttributes AbstractAxis::rulerAttributes() const
-{
- return d->rulerAttributes;
-}
-
-void AbstractAxis::setLabels( const QStringList& list )
-{
- if( d->hardLabels == list )
- return;
-
- d->hardLabels = list;
- update();
-}
-
-QStringList AbstractAxis::labels() const
-{
- return d->hardLabels;
-}
-
-void AbstractAxis::setShortLabels( const QStringList& list )
-{
- if( d->hardShortLabels == list )
- return;
-
- d->hardShortLabels = list;
- update();
-}
-
-QStringList AbstractAxis::shortLabels() const
-{
- return d->hardShortLabels;
-}
-
-const AbstractCoordinatePlane* AbstractAxis::coordinatePlane() const
-{
- if( d->diagram() )
- return d->diagram()->coordinatePlane();
- return 0;
-}
-
-const AbstractDiagram * KDChart::AbstractAxis::diagram() const
-{
- return d->diagram();
-}
-
-bool KDChart::AbstractAxis::observedBy( AbstractDiagram * diagram ) const
-{
- return d->hasDiagram( diagram );
-}
-
-void KDChart::AbstractAxis::update()
-{
- if( d->diagram() )
- d->diagram()->update();
-}
diff --git a/lib/libkdchart/src/KDChartAbstractAxis.h b/lib/libkdchart/src/KDChartAbstractAxis.h
deleted file mode 100644
index 44cb677..0000000
--- a/lib/libkdchart/src/KDChartAbstractAxis.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTAXIS_H
-#define KDCHARTABSTRACTAXIS_H
-
-// #include
-// #include
-// #include
-
-#include "kdchart_export.h"
-#include "KDChartGlobal.h"
-#include "KDChartAbstractArea.h"
-#include "KDChartTextAttributes.h"
-#include "KDChartRulerAttributes.h"
-
-
-class QPainter;
-class QSizeF;
-// class QRectF;
-
-
-namespace KDChart {
-
- class Area;
- class AbstractCoordinatePlane;
- class PaintContext;
- class AbstractDiagram;
-
- /**
- * The base class for axes.
- *
- * For being useful, axes need to be assigned to a diagram, see
- * AbstractCartesianDiagram::addAxis and AbstractCartesianDiagram::takeAxis.
- *
- * \sa PolarAxis, AbstractCartesianDiagram
- */
- class KDCHART_EXPORT AbstractAxis : public AbstractArea
- {
- Q_OBJECT
-
- Q_DISABLE_COPY( AbstractAxis )
- KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( AbstractAxis, AbstractDiagram* )
-
- public:
- explicit AbstractAxis( AbstractDiagram* diagram = 0 );
- virtual ~AbstractAxis();
-
- // FIXME implement when code os ready for it:
- // virtual Area* clone() const = 0;
-
- // FIXME (Mirko) readd when needed
- // void copyRelevantDetailsFrom( const KDChartAxis* axis );
-
- /* virtual void paint( PaintContext* ) const = 0;
- virtual QSize sizeHint() const = 0;*/
- //virtual void paintEvent( QPaintEvent* event) = 0;
-
- /**
- * \brief Implement this method if you want to adjust axis labels
- * before they are printed.
- *
- * KD Chart is calling this method immediately before drawing the
- * text, this means: What you return here will be drawn without
- * further modifications.
- *
- * \param label The text of the label as KD Chart has calculated it
- * automatically (or as it was taken from a QStringList provided
- * by you, resp.)
- *
- * \return The text to be drawn. By default this is the same as \c label.
- */
- virtual const QString customizedLabel( const QString& label )const;
-
- /**
- * Returns true if both axes have the same settings.
- */
- bool compare( const AbstractAxis* other )const;
-
- /**
- * \internal
- *
- * Method invoked by AbstractCartesianDiagram::addAxis().
- *
- * You should not call this function, unless you know exactly,
- * what you are doing.
- *
- * \sa connectSignals(), AbstractCartesianDiagram::addAxis()
- */
- void createObserver( AbstractDiagram* diagram );
-
- /**
- * \internal
- *
- * Method invoked by AbstractCartesianDiagram::takeAxis().
- *
- * You should not call this function, unless you know exactly,
- * what you are doing.
- *
- * \sa AbstractCartesianDiagram::takeAxis()
- */
- void deleteObserver( AbstractDiagram* diagram );
- const AbstractDiagram* diagram() const;
- bool observedBy( AbstractDiagram* diagram ) const;
-
- /**
- * Wireing the signal/slot connections.
- *
- * This method gets called automatically, each time, when you assign
- * the axis to a diagram, either by passing a diagram* to the c'tor,
- * or by calling the diagram's setAxis method, resp.
- *
- * If overwriting this method in derived classes, make sure to call
- * this base method AbstractAxis::connectSignals(), so your axis
- * gets connected to the diagram's built-in signals.
- *
- * \sa AbstractCartesianDiagram::addAxis()
- */
- virtual void connectSignals();
-
- /**
- \brief Use this to specify the text attributes to be used for axis labels.
-
- By default, the reference area will be set at painting time.
- It will be the then-valid coordinate plane's parent widget,
- so normally, it will be the KDChart::Chart.
- Thus the labels of all of your axes in all of your diagrams
- within that Chart will be drawn in same font size, by default.
-
- \sa textAttributes, setLabels
- */
- void setTextAttributes( const TextAttributes &a );
-
- /**
- \brief Returns the text attributes to be used for axis labels.
-
- \sa setTextAttributes
- */
- TextAttributes textAttributes() const;
-
- /**
- \brief Use this to specify the attributes used to paint the axis ruler
-
- Every axis has a default set of ruler attributes that is exactly the
- same among them. Use this method to specify your own attributes.
-
- \sa rulerAttributes
- */
- void setRulerAttributes( const RulerAttributes &a );
-
- /**
- \brief Returns the attributes to be used for painting the rulers
-
- \sa setRulerAttributes
- */
- RulerAttributes rulerAttributes() const;
-
- /**
- \brief Use this to specify your own set of strings, to be used as axis labels.
-
- Labels specified via setLabels take precedence:
- If a non-empty list is passed, KD Chart will use these strings as axis labels,
- instead of calculating them.
-
- If you a smaller number of strings than the number of labels drawn at this
- axis, KD Chart will iterate over the list, repeating the strings, until all
- labels are drawn.
- As an example you could specify the seven days of the week as abscissa labels,
- which would be repeatedly used then.
-
- By passing an empty QStringList you can reset the default behaviour.
-
- \sa labels, setShortLabels
- */
- void setLabels( const QStringList& list );
-
- /**
- Returns a list of strings, that are used as axis labels, as set via setLabels.
-
- \sa setLabels
- */
- QStringList labels() const;
-
- /**
- \brief Use this to specify your own set of strings, to be used as axis labels,
- in case the normal labels are too long.
-
- \note Setting done via setShortLabels will be ignored, if you did not pass
- a non-empty string list via setLabels too!
-
- By passing an empty QStringList you can reset the default behaviour.
-
- \sa shortLabels, setLabels
- */
- void setShortLabels( const QStringList& list );
-
- /**
- Returns a list of strings, that are used as axis labels, as set via setShortLabels.
-
- \note Setting done via setShortLabels will be ignored, if you did not pass
- a non-empty string list via setLabels too!
-
- \sa setShortLabels
- */
- QStringList shortLabels() const;
-
- virtual void setGeometry( const QRect& rect ) = 0;
- virtual QRect geometry() const = 0;
-
- /**
- \brief Convenience function, returns the coordinate plane, in which this axis is used.
-
- If the axis is not used in a coordinate plane, the return value is Zero.
- */
- const AbstractCoordinatePlane* coordinatePlane() const;
-
- protected Q_SLOTS:
- /** called for initializing after the c'tor has completed */
- virtual void delayedInit();
-
- public Q_SLOTS:
- void update();
- };
-}
-
-#endif // KDCHARTABSTRACTAXIS_H
diff --git a/lib/libkdchart/src/KDChartAbstractAxis_p.h b/lib/libkdchart/src/KDChartAbstractAxis_p.h
deleted file mode 100644
index ee00b5e..0000000
--- a/lib/libkdchart/src/KDChartAbstractAxis_p.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTAXIS_P_H
-#define KDCHARTAXIS_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include
-#include
-
-#include "KDChartAbstractArea_p.h"
-#include "KDChartAbstractDiagram.h"
-#include
-#include
-#include
-
-#include
-
-
-namespace KDChart {
-
-/**
- * \internal
- */
-class AbstractAxis::Private : public AbstractArea::Private
-{
- friend class AbstractAxis;
-
-public:
- Private( AbstractDiagram* diagram, AbstractAxis* axis );
- ~Private();
-
- bool setDiagram( AbstractDiagram* diagram, bool delayedInit = false );
- void unsetDiagram( AbstractDiagram* diagram );
- const AbstractDiagram* diagram() const
- {
- return mDiagram;
- }
- bool hasDiagram( AbstractDiagram* diagram ) const;
-
- DiagramObserver* observer;
-
- TextAttributes textAttributes;
- RulerAttributes rulerAttributes;
- QStringList hardLabels;
- QStringList hardShortLabels;
- QQueue secondaryDiagrams;
-
-protected:
- AbstractDiagram* mDiagram;
- AbstractAxis* mAxis;
-};
-
-
-inline AbstractAxis::AbstractAxis( Private * p, AbstractDiagram* diagram )
- : AbstractArea( p )
-{
- Q_UNUSED( diagram );
- init();
- QTimer::singleShot(0, this, SLOT(delayedInit()));
-}
-
-inline AbstractAxis::Private * AbstractAxis::d_func()
-{ return static_cast( AbstractArea::d_func() ); }
-inline const AbstractAxis::Private * AbstractAxis::d_func() const
-{ return static_cast( AbstractArea::d_func() ); }
-
-}
-#endif /* KDCHARTAREA_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractCartesianDiagram.cpp b/lib/libkdchart/src/KDChartAbstractCartesianDiagram.cpp
deleted file mode 100644
index 7f2ef90..0000000
--- a/lib/libkdchart/src/KDChartAbstractCartesianDiagram.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractCartesianDiagram.h"
-#include "KDChartAbstractCartesianDiagram_p.h"
-#include "KDChartPaintContext.h"
-#include
-#include
-
-#include
-
-
-using namespace KDChart;
-
-AbstractCartesianDiagram::Private::Private()
- : referenceDiagram( 0 )
-{
- qRegisterMetaType< QModelIndex >( "QModelIndex" );
-}
-
-AbstractCartesianDiagram::Private::~Private()
-{
-}
-
-bool AbstractCartesianDiagram::compare( const AbstractCartesianDiagram* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "AbstractCartesianDiagram::compare() cannot compare to Null pointer";
- return false;
- }
- /*
- qDebug() << "\n AbstractCartesianDiagram::compare():";
- // compare own properties
- qDebug() <<
- ((referenceDiagram() == other->referenceDiagram()) &&
- ((! referenceDiagram()) || (referenceDiagramOffset() == other->referenceDiagramOffset())));
- */
- return // compare the base class
- ( static_cast(this)->compare( other ) ) &&
- // compare own properties
- (referenceDiagram() == other->referenceDiagram()) &&
- ((! referenceDiagram()) || (referenceDiagramOffset() == other->referenceDiagramOffset()));
-}
-
-
-#define d d_func()
-
-AbstractCartesianDiagram::AbstractCartesianDiagram ( QWidget* parent, CartesianCoordinatePlane* plane )
- : AbstractDiagram ( new Private(), parent, plane )
-{
- init();
-}
-
-KDChart::AbstractCartesianDiagram::~AbstractCartesianDiagram()
-{
- Q_FOREACH( CartesianAxis* axis, d->axesList ) {
- axis->deleteObserver( this );
- }
- d->axesList.clear();
-}
-
-void AbstractCartesianDiagram::init()
-{
- d->compressor.setModel( attributesModel() );
- connect( this, SIGNAL( layoutChanged( AbstractDiagram* ) ),
- &( d->compressor ), SLOT( slotDiagramLayoutChanged( AbstractDiagram* ) ) );
-}
-
-void AbstractCartesianDiagram::addAxis( CartesianAxis *axis )
-{
- if ( !d->axesList.contains( axis ) ) {
- d->axesList.append( axis );
- axis->createObserver( this );
- layoutPlanes();
- }
-}
-
-void AbstractCartesianDiagram::takeAxis( CartesianAxis *axis )
-{
- const int idx = d->axesList.indexOf( axis );
- if( idx != -1 )
- d->axesList.takeAt( idx );
- axis->deleteObserver( this );
- axis->setParentWidget( 0 );
- layoutPlanes();
-}
-
-KDChart::CartesianAxisList AbstractCartesianDiagram::axes( ) const
-{
- return d->axesList;
-}
-
-void KDChart::AbstractCartesianDiagram::layoutPlanes()
-{
- //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()";
- AbstractCoordinatePlane* plane = coordinatePlane();
- if( plane ){
- plane->layoutPlanes();
- //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK";
- }
-}
-
-void KDChart::AbstractCartesianDiagram::setCoordinatePlane( AbstractCoordinatePlane* plane )
-{
- if( coordinatePlane() ) {
- disconnect( attributesModel(), SIGNAL( rowsRemoved( const QModelIndex&, int, int ) ),
- coordinatePlane(), SLOT( relayout() ) );
- disconnect( attributesModel(), SIGNAL( rowsInserted( const QModelIndex&, int, int ) ),
- coordinatePlane(), SLOT( relayout() ) );
- disconnect( attributesModel(), SIGNAL( columnsRemoved( const QModelIndex&, int, int ) ),
- coordinatePlane(), SLOT( relayout() ) );
- disconnect( attributesModel(), SIGNAL( columnsInserted( const QModelIndex&, int, int ) ),
- coordinatePlane(), SLOT( relayout() ) );
- disconnect( coordinatePlane() );
- }
-
- AbstractDiagram::setCoordinatePlane(plane);
- if ( plane ) {
- // Readjust the layout when the dataset count changes
- connect( attributesModel(), SIGNAL( rowsRemoved( const QModelIndex&, int, int ) ),
- plane, SLOT( relayout() ), Qt::QueuedConnection );
- connect( attributesModel(), SIGNAL( rowsInserted( const QModelIndex&, int, int ) ),
- plane, SLOT( relayout() ), Qt::QueuedConnection );
- connect( attributesModel(), SIGNAL( columnsRemoved( const QModelIndex&, int, int ) ),
- plane, SLOT( relayout() ), Qt::QueuedConnection );
- connect( attributesModel(), SIGNAL( columnsInserted( const QModelIndex&, int, int ) ),
- plane, SLOT( relayout() ), Qt::QueuedConnection );
- }
- // show the axes, after all have been layoutPlanes
- // (because they might depend on each other)
- /*
- if( plane )
- Q_FOREACH( CartesianAxis* axis, d->axesList )
- axis->show();
- else
- Q_FOREACH( CartesianAxis* axis, d->axesList )
- axis->hide();
- */
-}
-
-void AbstractCartesianDiagram::setReferenceDiagram( AbstractCartesianDiagram* diagram, const QPointF& offset )
-{
- d->referenceDiagram = diagram;
- d->referenceDiagramOffset = offset;
-}
-
-AbstractCartesianDiagram* AbstractCartesianDiagram::referenceDiagram() const
-{
- return d->referenceDiagram;
-}
-
-QPointF AbstractCartesianDiagram::referenceDiagramOffset() const
-{
- return d->referenceDiagramOffset;
-}
-
-void AbstractCartesianDiagram::setRootIndex( const QModelIndex& index )
-{
- AbstractDiagram::setRootIndex( index );
- d->compressor.setRootIndex( attributesModel()->mapFromSource( index ) );
-}
-
-void AbstractCartesianDiagram::setModel( QAbstractItemModel* model )
-{
- AbstractDiagram::setModel( model );
- d->compressor.setModel( attributesModel() );
-}
-
-void AbstractCartesianDiagram::setAttributesModel( AttributesModel* model )
-{
- AbstractDiagram::setAttributesModel( model );
- d->compressor.setModel( attributesModel() );
-}
diff --git a/lib/libkdchart/src/KDChartAbstractCartesianDiagram.h b/lib/libkdchart/src/KDChartAbstractCartesianDiagram.h
deleted file mode 100644
index 36983ba..0000000
--- a/lib/libkdchart/src/KDChartAbstractCartesianDiagram.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTCARTESIANDIAGRAM_H
-#define KDCHARTABSTRACTCARTESIANDIAGRAM_H
-
-#include "KDChartCartesianCoordinatePlane.h"
-#include "KDChartAbstractDiagram.h"
-#include "KDChartCartesianAxis.h"
-
-namespace KDChart {
-
- class GridAttributes;
-// class PaintContext;
-
- /**
- * @brief Base class for diagrams based on a cartesian coordianate system.
- *
- * The AbstractCartesianDiagram interface adds those elements that are
- * specific to diagrams based on a cartesian coordinate system to the
- * basic AbstractDiagram interface.
- */
- class KDCHART_EXPORT AbstractCartesianDiagram : public AbstractDiagram
- {
- Q_OBJECT
- Q_DISABLE_COPY( AbstractCartesianDiagram )
-// KDCHART_DECLARE_PRIVATE_DERIVED( AbstractCartesianDiagram )
- KDCHART_DECLARE_DERIVED_DIAGRAM( AbstractCartesianDiagram, CartesianCoordinatePlane )
-
- public:
- explicit AbstractCartesianDiagram ( QWidget* parent = 0, CartesianCoordinatePlane* plane = 0 );
- virtual ~AbstractCartesianDiagram();
-
- /**
- * Returns true if both diagrams have the same settings.
- */
- bool compare( const AbstractCartesianDiagram* other )const;
-
-#if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE)
- virtual const int numberOfAbscissaSegments () const = 0;
- virtual const int numberOfOrdinateSegments () const = 0;
-#else
- virtual int numberOfAbscissaSegments () const = 0;
- virtual int numberOfOrdinateSegments () const = 0;
-#endif
- /**
- * Add the axis to the diagram. The diagram takes ownership of the axis
- * and will delete it.
- *
- * To gain back ownership (e.g. for assigning the axis to another diagram)
- * use the takeAxis method, before calling addAxis on the other diagram.
- *
- * \sa takeAxis
- */
- virtual void addAxis( CartesianAxis * axis );
- /**
- * Removes the axis from the diagram, without deleting it.
- *
- * The diagram no longer owns the axis, so it is
- * the caller's responsibility to delete the axis.
- *
- * \sa addAxis
- */
- virtual void takeAxis( CartesianAxis * axis );
- /**
- * @return a list of all axes added to the diagram
- */
- virtual KDChart::CartesianAxisList axes () const;
-
- /**
- * Triggers layouting of all coordinate planes on the current chart.
- * Normally you don't need to call this method. It's handled automatically for you.
- */
- virtual void layoutPlanes();
- /** \reimpl */
- virtual void setCoordinatePlane( AbstractCoordinatePlane* plane );
-
- /**
- * Makes this diagram use another diagram \a diagram as reference diagram with relative offset
- * \a offset.
- * To share cartesian axes between different diagrams there might be cases when you need that.
- * Normally you don't.
- * \sa examples/SharedAbscissa
- */
- virtual void setReferenceDiagram( AbstractCartesianDiagram* diagram, const QPointF& offset = QPointF() );
- /**
- * @return this diagram's reference diagram
- * \sa setReferenceDiagram
- */
- virtual AbstractCartesianDiagram* referenceDiagram() const;
- /**
- * @return the relative offset of this diagram's reference diagram
- * \sa setReferenceDiagram
- */
- virtual QPointF referenceDiagramOffset() const;
-
- /* reimpl */
- void setModel( QAbstractItemModel* model );
- /* reimpl */
- void setRootIndex( const QModelIndex& index );
- /* reimpl */
- void setAttributesModel( AttributesModel* model );
-
- protected:
- /** @return the 3D item depth of the model index \a index */
- virtual double threeDItemDepth( const QModelIndex& index ) const = 0;
- /** @return the 3D item depth of the data set \a column */
- virtual double threeDItemDepth( int column ) const = 0;
- };
-
-}
-
-#endif
diff --git a/lib/libkdchart/src/KDChartAbstractCartesianDiagram_p.h b/lib/libkdchart/src/KDChartAbstractCartesianDiagram_p.h
deleted file mode 100644
index 526ff9c..0000000
--- a/lib/libkdchart/src/KDChartAbstractCartesianDiagram_p.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTCARTESIANDIAGRAM_P_H
-#define KDCHARTABSTRACTCARTESIANDIAGRAM_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "KDChartAbstractCartesianDiagram.h"
-
-#include
-#include
-#include
-
-#include
-
-
-namespace KDChart {
-
- class CartesianCoordinatePlane;
- class AbstractCartesianDiagram;
-
-/**
- * \internal
- */
-class AbstractCartesianDiagram::Private : public AbstractDiagram::Private
-{
- friend class AbstractCartesianDiagram;
-public:
- Private();
- virtual ~Private();
-
- Private( const Private& rhs ) :
- AbstractDiagram::Private( rhs ),
- // Do not copy axes and reference diagrams.
- axesList(),
- referenceDiagram( 0 )
- {
- }
-
- /** \reimpl */
- virtual CartesianDiagramDataCompressor::DataValueAttributesList aggregatedAttrs(
- AbstractDiagram * diagram,
- const QModelIndex & index,
- const CartesianDiagramDataCompressor::CachePosition * position ) const
- {
- if( position )
- return compressor.aggregatedAttrs( diagram, index, *position );
- CartesianDiagramDataCompressor::DataValueAttributesList allAttrs;
- allAttrs[index] = diagram->dataValueAttributes( index );
- return allAttrs;
- }
-
- CartesianAxisList axesList;
-
- AbstractCartesianDiagram* referenceDiagram;
- QPointF referenceDiagramOffset;
-
- mutable CartesianDiagramDataCompressor compressor;
-};
-
-KDCHART_IMPL_DERIVED_DIAGRAM( AbstractCartesianDiagram, AbstractDiagram, CartesianCoordinatePlane )
-/*
-inline AbstractCartesianDiagram::AbstractCartesianDiagram( Private * p )
- : AbstractDiagram( p ) { init(); }
-inline AbstractCartesianDiagram::AbstractCartesianDiagram(
- Private * p, QWidget* parent, CartesianCoordinatePlane* plane )
- : AbstractDiagram( p, parent, plane ) { init(); }
-inline AbstractCartesianDiagram::Private * AbstractCartesianDiagram::d_func()
-{ return static_cast( AbstractDiagram::d_func() ); }
-inline const AbstractCartesianDiagram::Private * AbstractCartesianDiagram::d_func() const
-{ return static_cast( AbstractDiagram::d_func() ); }
-*/
-
-}
-#endif /* KDCHARTABSTRACTCARTESIANDIAGRAM_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractCoordinatePlane.cpp b/lib/libkdchart/src/KDChartAbstractCoordinatePlane.cpp
deleted file mode 100644
index 55ea2a1..0000000
--- a/lib/libkdchart/src/KDChartAbstractCoordinatePlane.cpp
+++ /dev/null
@@ -1,453 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractCoordinatePlane.h"
-#include "KDChartAbstractCoordinatePlane_p.h"
-
-#include
-#include
-#include
-
-#include "KDChartChart.h"
-#include "KDChartGridAttributes.h"
-
-#include
-
-
-using namespace KDChart;
-
-#define d d_func()
-
-AbstractCoordinatePlane::Private::Private()
- : AbstractArea::Private()
- , parent( 0 )
- , grid( 0 )
- , referenceCoordinatePlane( 0 )
- , enableRubberBandZooming( false )
- , rubberBand( 0 )
-{
- // this bloc left empty intentionally
-}
-
-
-AbstractCoordinatePlane::AbstractCoordinatePlane ( KDChart::Chart* parent )
- : AbstractArea ( new Private() )
-{
- d->parent = parent;
- d->init();
-}
-
-AbstractCoordinatePlane::~AbstractCoordinatePlane()
-{
- emit destroyedCoordinatePlane( this );
-}
-
-void AbstractCoordinatePlane::init()
-{
- d->initialize(); // virtual method to init the correct grid: cartesian, polar, ...
- connect( this, SIGNAL(internal_geometryChanged( QRect, QRect )),
- this, SIGNAL(geometryChanged( QRect, QRect )),
- Qt::QueuedConnection );
-}
-
-void AbstractCoordinatePlane::addDiagram ( AbstractDiagram* diagram )
-{
- // diagrams are invisible and paint through their paint() method
- diagram->hide();
-
- d->diagrams.append( diagram );
- diagram->setParent( d->parent );
- diagram->setCoordinatePlane( this );
- layoutDiagrams();
- layoutPlanes(); // there might be new axes, etc
- connect( diagram, SIGNAL( modelsChanged() ), this, SLOT( layoutPlanes() ) );
- connect( diagram, SIGNAL( modelDataChanged() ), this, SLOT( update()) );
- connect( diagram, SIGNAL( modelDataChanged() ), this, SLOT( relayout()) );
-
- update();
-}
-
-/*virtual*/
-void AbstractCoordinatePlane::replaceDiagram ( AbstractDiagram* diagram, AbstractDiagram* oldDiagram_ )
-{
- if( diagram && oldDiagram_ != diagram ){
- AbstractDiagram* oldDiagram = oldDiagram_;
- if( d->diagrams.count() ){
- if( ! oldDiagram ){
- oldDiagram = d->diagrams.first();
- if( oldDiagram == diagram )
- return;
- }
- takeDiagram( oldDiagram );
- }
- delete oldDiagram;
- addDiagram( diagram );
- layoutDiagrams();
- layoutPlanes(); // there might be new axes, etc
- update();
- }
-}
-
-/*virtual*/
-void AbstractCoordinatePlane::takeDiagram ( AbstractDiagram* diagram )
-{
- const int idx = d->diagrams.indexOf( diagram );
- if( idx != -1 ){
- d->diagrams.removeAt( idx );
- diagram->setParent( 0 );
- diagram->setCoordinatePlane( 0 );
- disconnect( diagram, SIGNAL( modelsChanged() ), this, SLOT( layoutPlanes() ) );
- disconnect( diagram, SIGNAL( modelDataChanged() ), this, SLOT( update()) );
- disconnect( diagram, SIGNAL( modelDataChanged() ), this, SLOT( relayout()) );
- layoutDiagrams();
- update();
- }
-}
-
-
-AbstractDiagram* AbstractCoordinatePlane::diagram()
-{
- if ( d->diagrams.isEmpty() )
- {
- return 0;
- } else {
- return d->diagrams.first();
- }
-}
-
-AbstractDiagramList AbstractCoordinatePlane::diagrams()
-{
- return d->diagrams;
-}
-
-ConstAbstractDiagramList AbstractCoordinatePlane::diagrams() const
-{
- ConstAbstractDiagramList list;
-#ifndef QT_NO_STL
- qCopy( d->diagrams.begin(), d->diagrams.end(), std::back_inserter( list ) );
-#else
- Q_FOREACH( AbstractDiagram * a, d->diagrams )
- list.push_back( a );
-#endif
- return list;
-}
-
-QSize KDChart::AbstractCoordinatePlane::minimumSizeHint() const
-{
- return QSize( 200, 200 );
-}
-
-
-QSizePolicy KDChart::AbstractCoordinatePlane::sizePolicy() const
-{
- return QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
-}
-
-void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes( const GridAttributes& a )
-{
- d->gridAttributes = a;
- update();
-}
-
-GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes() const
-{
- return d->gridAttributes;
-}
-
-KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensionsList()
-{
- //KDChart::DataDimensionsList l( d->grid->updateData( this ) );
- //qDebug() << "AbstractCoordinatePlane::gridDimensionsList() Y-range:" << l.last().end - l.last().start << " step width:" << l.last().stepWidth;
- //qDebug() << "AbstractCoordinatePlane::gridDimensionsList() X-range:" << l.first().end - l.first().start << " step width:" << l.first().stepWidth;
- return d->grid->updateData( this );
-}
-
-void KDChart::AbstractCoordinatePlane::setGridNeedsRecalculate()
-{
- d->grid->setNeedRecalculate();
-}
-
-void KDChart::AbstractCoordinatePlane::setReferenceCoordinatePlane( AbstractCoordinatePlane * plane )
-{
- d->referenceCoordinatePlane = plane;
-}
-
-AbstractCoordinatePlane * KDChart::AbstractCoordinatePlane::referenceCoordinatePlane( ) const
-{
- return d->referenceCoordinatePlane;
-}
-
-void KDChart::AbstractCoordinatePlane::setParent( KDChart::Chart* parent )
-{
- d->parent = parent;
-}
-
-const KDChart::Chart* KDChart::AbstractCoordinatePlane::parent() const
-{
- return d->parent;
-}
-
-KDChart::Chart* KDChart::AbstractCoordinatePlane::parent()
-{
- return d->parent;
-}
-
-/* pure virtual in QLayoutItem */
-bool KDChart::AbstractCoordinatePlane::isEmpty() const
-{
- return false; // never empty!
- // coordinate planes with no associated diagrams
- // are showing a default grid of ()1..10, 1..10) stepWidth 1
-}
-/* pure virtual in QLayoutItem */
-Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections() const
-{
- return Qt::Vertical | Qt::Horizontal;
-}
-/* pure virtual in QLayoutItem */
-QSize KDChart::AbstractCoordinatePlane::maximumSize() const
-{
- // No maximum size set. Especially not parent()->size(), we are not layouting
- // to the parent widget's size when using Chart::paint()!
- return QSize(QLAYOUTSIZE_MAX, QLAYOUTSIZE_MAX);
-}
-/* pure virtual in QLayoutItem */
-QSize KDChart::AbstractCoordinatePlane::minimumSize() const
-{
- return QSize(60, 60); // this default can be overwritten by derived classes
-}
-/* pure virtual in QLayoutItem */
-QSize KDChart::AbstractCoordinatePlane::sizeHint() const
-{
- // we return our maxiumu (which is the full size of the Chart)
- // even if we know the plane will be smaller
- return maximumSize();
-}
-/* pure virtual in QLayoutItem */
-void KDChart::AbstractCoordinatePlane::setGeometry( const QRect& r )
-{
-// qDebug() << "KDChart::AbstractCoordinatePlane::setGeometry(" << r << ") called";
- if( d->geometry != r ){
- //qDebug() << "entering KDChart::AbstractCoordinatePlane::setGeometry(" << r << ")";
- // inform the outside word by Signal geometryChanged()
- // via a queued connection to internal_geometryChanged()
- emit internal_geometryChanged( d->geometry, r );
-
- d->geometry = r;
- // Note: We do *not* call update() here
- // because it would invoke KDChart::update() recursively.
- //qDebug() << "leaving KDChart::AbstractCoordinatePlane::setGeometry(" << r << ")";
- }
-}
-/* pure virtual in QLayoutItem */
-QRect KDChart::AbstractCoordinatePlane::geometry() const
-{
- return d->geometry;
-}
-
-void KDChart::AbstractCoordinatePlane::update()
-{
- //qDebug("KDChart::AbstractCoordinatePlane::update() called");
- emit needUpdate();
-}
-
-void KDChart::AbstractCoordinatePlane::relayout()
-{
- //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");
- emit needRelayout();
-}
-
-void KDChart::AbstractCoordinatePlane::layoutPlanes()
-{
- //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");
- emit needLayoutPlanes();
-}
-
-void KDChart::AbstractCoordinatePlane::setRubberBandZoomingEnabled( bool enable )
-{
- d->enableRubberBandZooming = enable;
-
- if( !enable && d->rubberBand != 0 )
- {
- delete d->rubberBand;
- d->rubberBand = 0;
- }
-}
-
-bool KDChart::AbstractCoordinatePlane::isRubberBandZoomingEnabled() const
-{
- return d->enableRubberBandZooming;
-}
-
-void KDChart::AbstractCoordinatePlane::mousePressEvent( QMouseEvent* event )
-{
- if( event->button() == Qt::LeftButton )
- {
- if( d->enableRubberBandZooming && d->rubberBand == 0 )
- d->rubberBand = new QRubberBand( QRubberBand::Rectangle, qobject_cast< QWidget* >( parent() ) );
-
- if( d->rubberBand != 0 )
- {
- d->rubberBandOrigin = event->pos();
- d->rubberBand->setGeometry( QRect( event->pos(), QSize() ) );
- d->rubberBand->show();
-
- event->accept();
- }
- }
- else if( event->button() == Qt::RightButton )
- {
- if( d->enableRubberBandZooming && !d->rubberBandZoomConfigHistory.isEmpty() )
- {
- // restore the last config from the stack
- ZoomParameters config = d->rubberBandZoomConfigHistory.pop();
- setZoomFactorX( config.xFactor );
- setZoomFactorY( config.yFactor );
- setZoomCenter( config.center() );
-
- QWidget* const p = qobject_cast< QWidget* >( parent() );
- if( p != 0 )
- p->update();
-
- event->accept();
- }
- }
-
- KDAB_FOREACH( AbstractDiagram * a, d->diagrams )
- {
- a->mousePressEvent( event );
- }
-}
-
-void KDChart::AbstractCoordinatePlane::mouseDoubleClickEvent( QMouseEvent* event )
-{
- if( event->button() == Qt::RightButton )
- {
- // othewise the second click gets lost
- // which is pretty annoying when zooming out fast
- mousePressEvent( event );
- }
- KDAB_FOREACH( AbstractDiagram * a, d->diagrams )
- {
- a->mouseDoubleClickEvent( event );
- }
-}
-
-void KDChart::AbstractCoordinatePlane::mouseReleaseEvent( QMouseEvent* event )
-{
- if( d->rubberBand != 0 )
- {
- // save the old config on the stack
- d->rubberBandZoomConfigHistory.push( ZoomParameters( zoomFactorX(), zoomFactorY(), zoomCenter() ) );
-
- // this is the height/width of the rubber band in pixel space
- const double rubberWidth = static_cast< double >( d->rubberBand->width() );
- const double rubberHeight = static_cast< double >( d->rubberBand->height() );
-
- if( rubberWidth > 0.0 && rubberHeight > 0.0 )
- {
- // this is the center of the rubber band in pixel space
- const double rubberCenterX = static_cast< double >( d->rubberBand->geometry().center().x() - geometry().x() );
- const double rubberCenterY = static_cast< double >( d->rubberBand->geometry().center().y() - geometry().y() );
-
- // this is the height/width of the plane in pixel space
- const double myWidth = static_cast< double >( geometry().width() );
- const double myHeight = static_cast< double >( geometry().height() );
-
- // this describes the new center of zooming, relative to the plane pixel space
- const double newCenterX = rubberCenterX / myWidth / zoomFactorX() + zoomCenter().x() - 0.5 / zoomFactorX();
- const double newCenterY = rubberCenterY / myHeight / zoomFactorY() + zoomCenter().y() - 0.5 / zoomFactorY();
-
- // this will be the new zoom factor
- const double newZoomFactorX = zoomFactorX() * myWidth / rubberWidth;
- const double newZoomFactorY = zoomFactorY() * myHeight / rubberHeight;
-
- // and this the new center
- const QPointF newZoomCenter( newCenterX, newCenterY );
-
- setZoomFactorX( newZoomFactorX );
- setZoomFactorY( newZoomFactorY );
- setZoomCenter( newZoomCenter );
- }
-
- d->rubberBand->parentWidget()->update();
- delete d->rubberBand;
- d->rubberBand = 0;
-
- event->accept();
- }
-
- KDAB_FOREACH( AbstractDiagram * a, d->diagrams )
- {
- a->mouseReleaseEvent( event );
- }
-}
-
-void KDChart::AbstractCoordinatePlane::mouseMoveEvent( QMouseEvent* event )
-{
- if( d->rubberBand != 0 )
- {
- const QRect normalized = QRect( d->rubberBandOrigin, event->pos() ).normalized();
- d->rubberBand->setGeometry( normalized & geometry() );
-
- event->accept();
- }
-
- KDAB_FOREACH( AbstractDiagram * a, d->diagrams )
- {
- a->mouseMoveEvent( event );
- }
-}
-
-#if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE)
-const
-#endif
-bool KDChart::AbstractCoordinatePlane::isVisiblePoint( const QPointF& point ) const
-{
- return d->isVisiblePoint( this, point );
-}
-
-AbstractCoordinatePlane* KDChart::AbstractCoordinatePlane::sharedAxisMasterPlane( QPainter* p )
-{
- Q_UNUSED( p );
- return this;
-}
-
-#if !defined(QT_NO_DEBUG_STREAM)
-#include "KDChartEnums.h"
-
-QDebug KDChart::operator<<( QDebug stream, const DataDimension& r )
-{
- stream << "DataDimension("
- << " start=" << r.start
- << " end=" << r.end
- << " sequence=" << KDChartEnums::granularitySequenceToString( r.sequence )
- << " isCalculated=" << r.isCalculated
- << " calcMode=" << ( r.calcMode == AbstractCoordinatePlane::Logarithmic ? "Logarithmic" : "Linear" )
- << " stepWidth=" << r.stepWidth
- << " subStepWidth=" << r.subStepWidth
- << " )";
- return stream;
-}
-#endif
-
-#undef d
diff --git a/lib/libkdchart/src/KDChartAbstractCoordinatePlane.h b/lib/libkdchart/src/KDChartAbstractCoordinatePlane.h
deleted file mode 100644
index 481e72b..0000000
--- a/lib/libkdchart/src/KDChartAbstractCoordinatePlane.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTCOORDINATEPLANE_H
-#define KDCHARTABSTRACTCOORDINATEPLANE_H
-
-#include
-#include
-
-#include "KDChartAbstractArea.h"
-#include "KDChartAbstractDiagram.h"
-#include "KDChartEnums.h"
-
-namespace KDChart {
-
- class Chart;
- class GridAttributes;
- class DataDimension;
-
- typedef QList DataDimensionsList;
-
- /**
- * @brief Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane
- */
- class KDCHART_EXPORT AbstractCoordinatePlane : public AbstractArea
- {
- Q_OBJECT
-
- Q_DISABLE_COPY( AbstractCoordinatePlane )
- KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( AbstractCoordinatePlane, Chart* )
-
- friend class AbstractGrid;
-
- public:
- enum AxesCalcMode { Linear, Logarithmic };
-
- protected:
- explicit AbstractCoordinatePlane ( Chart* parent = 0 );
-
- public:
- virtual ~AbstractCoordinatePlane();
-
- /**
- * Adds a diagram to this coordinate plane.
- * @param diagram The diagram to add.
- *
- * \sa replaceDiagram, takeDiagram
- */
- virtual void addDiagram ( AbstractDiagram* diagram );
-
- /**
- * Replaces the old diagram, or appends the
- * diagram, it there is none yet.
- *
- * @param diagram The diagram to be used instead of the old diagram.
- * This parameter must not be zero, or the method will do nothing.
- *
- * @param oldDiagram The diagram to be removed by the new diagram. This
- * diagram will be deleted automatically. If the parameter is omitted,
- * the very first diagram will be replaced. In case, there was no
- * diagram yet, the new diagram will just be added.
- *
- * \note If you want to re-use the old diagram, call takeDiagram and
- * addDiagram, instead of using replaceDiagram.
- *
- * \sa addDiagram, takeDiagram
- */
- virtual void replaceDiagram ( AbstractDiagram* diagram, AbstractDiagram* oldDiagram = 0 );
-
- /**
- * Removes the diagram from the plane, without deleting it.
- *
- * The plane no longer owns the diagram, so it is
- * the caller's responsibility to delete the diagram.
- *
- * \sa addDiagram, replaceDiagram
- */
- virtual void takeDiagram( AbstractDiagram* diagram );
-
- /**
- * @return The first diagram associated with this coordinate plane.
- */
- AbstractDiagram* diagram();
-
- /**
- * @return The list of diagrams associated with this coordinate plane.
- */
- AbstractDiagramList diagrams();
-
- /**
- * @return The list of diagrams associated with this coordinate plane.
- */
- ConstAbstractDiagramList diagrams() const;
-
- /**
- * Distribute the available space among the diagrams and axes.
- */
- virtual void layoutDiagrams() = 0;
-
- /**
- * Translate the given point in value space coordinates to a position
- * in pixel space.
- * @param diagramPoint The point in value coordinates.
- * @returns The translated point.
- */
- virtual const QPointF translate ( const QPointF& diagramPoint ) const = 0;
-
- /** \reimpl */
- virtual QSize minimumSizeHint() const;
- /** \reimpl */
- virtual QSizePolicy sizePolicy() const;
-
- /**
- * @return Whether zooming with a rubber band using the mouse is enabled.
- */
- bool isRubberBandZoomingEnabled() const;
-
- /**
- * Enables or disables zooming with a rubber band using the mouse.
- */
- void setRubberBandZoomingEnabled( bool enable );
-
- /**
- * @return The zoom factor in horizontal direction, that is applied
- * to all coordinate transformations.
- */
- virtual double zoomFactorX() const { return 1.0; }
-
- /**
- * @return The zoom factor in vertical direction, that is applied
- * to all coordinate transformations.
- */
- virtual double zoomFactorY() const { return 1.0; }
-
- /**
- * Sets both zoom factors in one go.
- * \sa setZoomFactorX,setZoomFactorY
- */
- virtual void setZoomFactors( double factorX, double factorY ) { Q_UNUSED( factorX ); Q_UNUSED( factorY ); }
-
- /**
- * Sets the zoom factor in horizontal direction, that is applied
- * to all coordinate transformations.
- * @param factor The new zoom factor
- */
- virtual void setZoomFactorX( double factor ) { Q_UNUSED( factor ); }
-
- /**
- * Sets the zoom factor in vertical direction, that is applied
- * to all coordinate transformations.
- * @param factor The new zoom factor
- */
- virtual void setZoomFactorY( double factor ) { Q_UNUSED( factor ); }
-
- /**
- * @return The center point (in value coordinates) of the
- * coordinate plane, that is used for zoom operations.
- */
- virtual QPointF zoomCenter() const { return QPointF(0.0, 0.0); }
-
- /**
- * Set the point (in value coordinates) to be used as the
- * center point in zoom operations.
- * @param center The point to use.
- */
- virtual void setZoomCenter( const QPointF& center ) { Q_UNUSED( center ); }
-
- /**
- * Set the grid attributes to be used by this coordinate plane.
- * To disable grid painting, for example, your code should like this:
- * \code
- * GridAttributes ga = plane->globalGridAttributes();
- * ga.setGlobalGridVisible( false );
- * plane->setGlobalGridAttributes( ga );
- * \endcode
- * \sa globalGridAttributes
- * \sa CartesianCoordinatePlane::setGridAttributes
- */
- void setGlobalGridAttributes( const GridAttributes & );
-
- /**
- * @return The grid attributes used by this coordinate plane.
- * \sa setGlobalGridAttributes
- * \sa CartesianCoordinatePlane::gridAttributes
- */
- GridAttributes globalGridAttributes() const;
-
- /**
- * Returns the dimensions used for drawing the grid lines.
- *
- * Returned data is the result of (cached) grid calculations,
- * so - if you need that information for your own tasks - make sure to
- * call again this function after every data modification that has changed
- * the data range, since grid calculation is based upon the data range,
- * thus the grid start/end might have changed if the data was changed.
- *
- * @note Returned list will contain different numbers of DataDimension,
- * depending on the kind of coordinate plane used.
- * For CartesianCoordinatePlane two DataDimension are returned: the first
- * representing grid lines in X direction (matching the Abscissa axes)
- * and the second indicating vertical grid lines (or Ordinate axes, resp.).
- *
- * @return The dimensions used for drawing the grid lines.
- * @sa DataDimension
- */
- DataDimensionsList gridDimensionsList();
-
- /**
- * Set another coordinate plane to be used as the reference plane
- * for this one.
- * @param plane The coordinate plane to be used the reference plane
- * for this one.
- * @see referenceCoordinatePlane
- */
- void setReferenceCoordinatePlane( AbstractCoordinatePlane * plane );
-
- /**
- * There are two ways, in which planes can be caused to interact, in
- * where they are put layouting wise: The first is the reference plane. If
- * such a reference plane is set, on a plane, it will use the same cell in the
- * layout as that one. In addition to this, planes can share an axis. In that case
- * they will be laid out in relation to each other as suggested by the position
- * of the axis. If, for example Plane1 and Plane2 share an axis at position Left,
- * that will result in the layout: Axis Plane1 Plane 2, vertically. If Plane1
- * also happens to be Plane2's reference plane, both planes are drawn over each
- * other. The reference plane concept allows two planes to share the same space
- * even if neither has any axis, and in case there are shared axis, it is used
- * to decided, whether the planes should be painted on top of each other or
- * laid out vertically or horizontally next to each other.
- * @return The reference coordinate plane associated with this one.
- */
- AbstractCoordinatePlane * referenceCoordinatePlane() const;
-
- virtual AbstractCoordinatePlane* sharedAxisMasterPlane( QPainter* p = 0 );
-
-
- /** pure virtual in QLayoutItem */
- virtual bool isEmpty() const;
- /** pure virtual in QLayoutItem */
- virtual Qt::Orientations expandingDirections() const;
- /** pure virtual in QLayoutItem */
- virtual QSize maximumSize() const;
- /** pure virtual in QLayoutItem */
- virtual QSize minimumSize() const;
- /** pure virtual in QLayoutItem */
- virtual QSize sizeHint() const;
- /** pure virtual in QLayoutItem
- *
- * \note Do not call this function directly, unless you know
- * exactly what you are doing. Geometry management is done
- * by KD Chart's internal layouting measures.
- */
- virtual void setGeometry( const QRect& r );
- /** pure virtual in QLayoutItem */
- virtual QRect geometry() const;
-
- virtual void mousePressEvent( QMouseEvent* event );
- virtual void mouseDoubleClickEvent( QMouseEvent* event );
- virtual void mouseMoveEvent( QMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent* event );
-
- /**
- * Called internally by KDChart::Chart
- */
- void setParent( Chart* parent );
- Chart* parent();
- const Chart* parent() const;
-
- /**
- * Tests, if a point is visible on the coordinate plane.
- *
- * \note Before calling this function the point must have been translated into coordinate plane space.
- */
-#if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE)
- const bool isVisiblePoint( const QPointF& point ) const;
-#else
- bool isVisiblePoint( const QPointF& point ) const;
-#endif
-
- public Q_SLOTS:
- /**
- * Calling update() on the plane triggers the global KDChart::Chart::update()
- */
- void update();
- /**
- * Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout()
- */
- void relayout();
- /**
- * Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes()
- */
- void layoutPlanes();
- /**
- * Used by the chart to clear the cached grid data.
- */
- void setGridNeedsRecalculate();
-
- Q_SIGNALS:
- /** Emitted when this coordinate plane is destroyed. */
- void destroyedCoordinatePlane( AbstractCoordinatePlane* );
-
- /** Emitted when plane needs to update its drawings. */
- void needUpdate();
-
- /** Emitted when plane needs to trigger the Chart's layouting. */
- void needRelayout();
-
- /** Emitted when plane needs to trigger the Chart's layouting of the coord. planes. */
- void needLayoutPlanes();
-
- /** Emitted upon change of a property of the Coordinate Plane or any of its components. */
- void propertiesChanged();
-
- /** Emitted after the geometry of the Coordinate Plane has been changed.
- * and control has returned to the event loop.
- *
- * Parameters are the the old geometry, the new geometry.
- */
- void geometryChanged( QRect, QRect );
-
- private:
- Q_SIGNALS:
- // Emitted from inside the setGeometry()
- // This is connected via QueuedConnection to the geometryChanged() Signal
- // that users can connect to safely then.
- void internal_geometryChanged( QRect, QRect );
-
- protected:
- virtual DataDimensionsList getDataDimensionsList() const = 0;
-
- //KDCHART_DECLARE_PRIVATE_DERIVED( AbstractCoordinatePlane )
- };
-
- /**
- * \brief Helper class for one dimension of data, e.g. for the rows in a data model,
- * or for the labels of an axis, or for the vertical lines in a grid.
- *
- * isCalculated specifies whether this dimension's values are calculated or counted.
- * (counted == "Item 1", "Item 2", "Item 3" ...)
- *
- * sequence is the GranularitySequence, as specified at for the respective
- * coordinate plane.
- *
- * Step width is an optional parameter, to be omitted (or set to Zero, resp.)
- * if the step width is unknown.
- *
- * The default c'tor just gets you counted values from 1..10, using step width 1,
- * used by the CartesianGrid, when showing an empty plane without any diagrams.
- */
- class DataDimension{
- public:
- DataDimension()
- : start( 1.0 )
- , end( 10.0 )
- , isCalculated( false )
- , calcMode( AbstractCoordinatePlane::Linear )
- , sequence( KDChartEnums::GranularitySequence_10_20 )
- , stepWidth( 1.0 )
- , subStepWidth( 0.0 )
- {}
- DataDimension( qreal start_,
- qreal end_,
- bool isCalculated_,
- AbstractCoordinatePlane::AxesCalcMode calcMode_,
- KDChartEnums::GranularitySequence sequence_,
- qreal stepWidth_=0.0,
- qreal subStepWidth_=0.0 )
- : start( start_ )
- , end( end_ )
- , isCalculated( isCalculated_ )
- , calcMode( calcMode_ )
- , sequence( sequence_ )
- , stepWidth( stepWidth_ )
- , subStepWidth( subStepWidth_ )
- {}
- /**
- * Returns the size of the distance,
- * equivalent to the width() (or height(), resp.) of a QRectF.
- *
- * Note that this value can be negative, e.g. indicating axis labels
- * going in reversed direction.
- */
- qreal distance() const
- {
- return end-start;
- }
-
- bool operator==( const DataDimension& r ) const
- {
- return
- (start == r.start) &&
- (end == r.end) &&
- (sequence == r.sequence) &&
- (isCalculated == r.isCalculated) &&
- (calcMode == r.calcMode) &&
- (stepWidth == r.stepWidth) &&
- (subStepWidth == r.subStepWidth);
- }
-
- bool operator!=( const DataDimension& other ) const
- { return !operator==( other ); }
-
-
- qreal start;
- qreal end;
- bool isCalculated;
- AbstractCoordinatePlane::AxesCalcMode calcMode;
- KDChartEnums::GranularitySequence sequence;
- qreal stepWidth;
- qreal subStepWidth;
- };
-
-#if !defined(QT_NO_DEBUG_STREAM)
- QDebug operator<<( QDebug stream, const DataDimension& r );
-#endif
-
-}
-#endif
diff --git a/lib/libkdchart/src/KDChartAbstractCoordinatePlane_p.h b/lib/libkdchart/src/KDChartAbstractCoordinatePlane_p.h
deleted file mode 100644
index 8500a80..0000000
--- a/lib/libkdchart/src/KDChartAbstractCoordinatePlane_p.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRCOORDINATEPLANE_P_H
-#define KDCHARTABSTRCOORDINATEPLANE_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "KDChartAbstractArea_p.h"
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-
-class QRubberBand;
-
-namespace KDChart {
-
-
-/**
- * \internal
- */
-class AbstractCoordinatePlane::Private : public AbstractArea::Private
-{
- friend class AbstractCoordinatePlane;
-protected:
- explicit Private();
- virtual ~Private(){
- delete grid;
- };
-
- virtual void initialize()
- {
- qDebug("ERROR: Calling AbstractCoordinatePlane::Private::initialize()");
- // can not call the base class: grid = new AbstractGrid();
- }
-
- virtual bool isVisiblePoint(
- const AbstractCoordinatePlane * plane,
- const QPointF& point ) const
- {
- Q_UNUSED( plane );
- Q_UNUSED( point );
- return true;
- }
-
- KDChart::Chart* parent;
- AbstractGrid* grid;
- QRect geometry;
- AbstractDiagramList diagrams;
- GridAttributes gridAttributes;
- AbstractCoordinatePlane *referenceCoordinatePlane;
-
- bool enableRubberBandZooming;
- QRubberBand* rubberBand;
- QPoint rubberBandOrigin;
-
- QStack< ZoomParameters > rubberBandZoomConfigHistory;
-};
-
-
-inline AbstractCoordinatePlane::AbstractCoordinatePlane( Private * p, KDChart::Chart* parent )
- : AbstractArea( p )
-{
- if( p )
- p->parent = parent;
- init();
-}
-inline AbstractCoordinatePlane::Private * AbstractCoordinatePlane::d_func()
-{
- return static_cast( AbstractArea::d_func() );
-}
-inline const AbstractCoordinatePlane::Private * AbstractCoordinatePlane::d_func() const
-{
- return static_cast( AbstractArea::d_func() );
-}
-
-
-}
-
-#endif /* KDCHARTABSTRACTCOORDINATEPLANE_P_H*/
diff --git a/lib/libkdchart/src/KDChartAbstractDiagram.cpp b/lib/libkdchart/src/KDChartAbstractDiagram.cpp
deleted file mode 100644
index 74ede14..0000000
--- a/lib/libkdchart/src/KDChartAbstractDiagram.cpp
+++ /dev/null
@@ -1,1083 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractDiagram.h"
-#include "KDChartAbstractDiagram_p.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "KDChartAbstractCoordinatePlane.h"
-#include "KDChartChart.h"
-#include "KDChartDataValueAttributes.h"
-#include "KDChartTextAttributes.h"
-#include "KDChartMarkerAttributes.h"
-#include "KDChartAbstractThreeDAttributes.h"
-#include "KDChartThreeDLineAttributes.h"
-
-#include
-
-#define PI 3.141592653589793
-
-using namespace KDChart;
-
-AbstractDiagram::Private::Private()
- : plane( 0 )
- , attributesModel( new PrivateAttributesModel(0,0) )
- , allowOverlappingDataValueTexts( false )
- , antiAliasing( true )
- , percent( false )
- , datasetDimension( 1 )
- , databoundariesDirty(true)
- , lastRoundedValue()
- , lastX( 0 )
- , mCachedFontMetrics( QFontMetrics( qApp->font() ) )
-{
-}
-
-AbstractDiagram::Private::~Private()
-{
- if( attributesModel && qobject_cast(attributesModel) )
- delete attributesModel;
-}
-
-void AbstractDiagram::Private::init()
-{
-}
-
-void AbstractDiagram::Private::init( AbstractCoordinatePlane* newPlane )
-{
- plane = newPlane;
-}
-
-bool AbstractDiagram::Private::usesExternalAttributesModel()const
-{
- return ( ! attributesModel.isNull() ) &&
- ( ! qobject_cast(attributesModel) );
-}
-
-void AbstractDiagram::Private::setAttributesModel( AttributesModel* amodel )
-{
- if( !attributesModel.isNull() &&
- qobject_cast(attributesModel) ) {
- delete attributesModel;
- }
- attributesModel = amodel;
-}
-
-AbstractDiagram::Private::Private( const AbstractDiagram::Private& rhs ) :
- // Do not copy the plane
- plane( 0 ),
- attributesModelRootIndex( QModelIndex() ),
- attributesModel( rhs.attributesModel ),
- allowOverlappingDataValueTexts( rhs.allowOverlappingDataValueTexts ),
- antiAliasing( rhs.antiAliasing ),
- percent( rhs.percent ),
- datasetDimension( rhs.datasetDimension ),
- mCachedFontMetrics( rhs.cachedFontMetrics() )
-{
- attributesModel = new PrivateAttributesModel( 0, 0);
- attributesModel->initFrom( rhs.attributesModel );
-}
-
-#define d d_func()
-
-AbstractDiagram::AbstractDiagram ( QWidget* parent, AbstractCoordinatePlane* plane )
- : QAbstractItemView ( parent ), _d( new Private() )
-{
- _d->init( plane );
- init();
-}
-
-AbstractDiagram::~AbstractDiagram()
-{
- emit aboutToBeDestroyed();
- delete _d;
-}
-
-void AbstractDiagram::init()
-{
- d->reverseMapper.setDiagram( this );
-}
-
-
-bool AbstractDiagram::compare( const AbstractDiagram* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "AbstractDiagram::compare() cannot compare to Null pointer";
- return false;
- }
- /*
- qDebug() << "\n AbstractDiagram::compare() QAbstractScrollArea:";
- // compare QAbstractScrollArea properties
- qDebug() <<
- ((horizontalScrollBarPolicy() == other->horizontalScrollBarPolicy()) &&
- (verticalScrollBarPolicy() == other->verticalScrollBarPolicy()));
- qDebug() << "AbstractDiagram::compare() QFrame:";
- // compare QFrame properties
- qDebug() <<
- ((frameShadow() == other->frameShadow()) &&
- (frameShape() == other->frameShape()) &&
- (frameWidth() == other->frameWidth()) &&
- (lineWidth() == other->lineWidth()) &&
- (midLineWidth() == other->midLineWidth()));
- qDebug() << "AbstractDiagram::compare() QAbstractItemView:";
- // compare QAbstractItemView properties
- qDebug() <<
- ((alternatingRowColors() == other->alternatingRowColors()) &&
- (hasAutoScroll() == other->hasAutoScroll()) &&
-#if QT_VERSION > 0x040199
- (dragDropMode() == other->dragDropMode()) &&
- (dragDropOverwriteMode() == other->dragDropOverwriteMode()) &&
- (horizontalScrollMode() == other->horizontalScrollMode ()) &&
- (verticalScrollMode() == other->verticalScrollMode()) &&
-#endif
- (dragEnabled() == other->dragEnabled()) &&
- (editTriggers() == other->editTriggers()) &&
- (iconSize() == other->iconSize()) &&
- (selectionBehavior() == other->selectionBehavior()) &&
- (selectionMode() == other->selectionMode()) &&
- (showDropIndicator() == other->showDropIndicator()) &&
- (tabKeyNavigation() == other->tabKeyNavigation()) &&
- (textElideMode() == other->textElideMode()));
- qDebug() << "AbstractDiagram::compare() AttributesModel: ";
- // compare all of the properties stored in the attributes model
- qDebug() << attributesModel()->compare( other->attributesModel() );
- qDebug() << "AbstractDiagram::compare() own:";
- // compare own properties
- qDebug() <<
- ((rootIndex().column() == other->rootIndex().column()) &&
- (rootIndex().row() == other->rootIndex().row()) &&
- (allowOverlappingDataValueTexts() == other->allowOverlappingDataValueTexts()) &&
- (antiAliasing() == other->antiAliasing()) &&
- (percentMode() == other->percentMode()) &&
- (datasetDimension() == other->datasetDimension()));
- */
- return // compare QAbstractScrollArea properties
- (horizontalScrollBarPolicy() == other->horizontalScrollBarPolicy()) &&
- (verticalScrollBarPolicy() == other->verticalScrollBarPolicy()) &&
- // compare QFrame properties
- (frameShadow() == other->frameShadow()) &&
- (frameShape() == other->frameShape()) &&
-// frameWidth is a read-only property defined by the style, it should not be in here:
- // (frameWidth() == other->frameWidth()) &&
- (lineWidth() == other->lineWidth()) &&
- (midLineWidth() == other->midLineWidth()) &&
- // compare QAbstractItemView properties
- (alternatingRowColors() == other->alternatingRowColors()) &&
- (hasAutoScroll() == other->hasAutoScroll()) &&
-#if QT_VERSION > 0x040199
- (dragDropMode() == other->dragDropMode()) &&
- (dragDropOverwriteMode() == other->dragDropOverwriteMode()) &&
- (horizontalScrollMode() == other->horizontalScrollMode ()) &&
- (verticalScrollMode() == other->verticalScrollMode()) &&
-#endif
- (dragEnabled() == other->dragEnabled()) &&
- (editTriggers() == other->editTriggers()) &&
- (iconSize() == other->iconSize()) &&
- (selectionBehavior() == other->selectionBehavior()) &&
- (selectionMode() == other->selectionMode()) &&
- (showDropIndicator() == other->showDropIndicator()) &&
- (tabKeyNavigation() == other->tabKeyNavigation()) &&
- (textElideMode() == other->textElideMode()) &&
- // compare all of the properties stored in the attributes model
- attributesModel()->compare( other->attributesModel() ) &&
- // compare own properties
- (rootIndex().column() == other->rootIndex().column()) &&
- (rootIndex().row() == other->rootIndex().row()) &&
- (allowOverlappingDataValueTexts() == other->allowOverlappingDataValueTexts()) &&
- (antiAliasing() == other->antiAliasing()) &&
- (percentMode() == other->percentMode()) &&
- (datasetDimension() == other->datasetDimension());
-}
-
-AbstractCoordinatePlane* AbstractDiagram::coordinatePlane() const
-{
- return d->plane;
-}
-
-const QPair AbstractDiagram::dataBoundaries () const
-{
- if( d->databoundariesDirty ){
- d->databoundaries = calculateDataBoundaries ();
- d->databoundariesDirty = false;
- }
- return d->databoundaries;
-}
-
-void AbstractDiagram::setDataBoundariesDirty() const
-{
- d->databoundariesDirty = true;
-}
-
-void AbstractDiagram::setModel( QAbstractItemModel * newModel )
-{
- if( model() )
- {
- disconnect( model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( columnsInserted( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( columnsRemoved( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( modelReset() ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( layoutChanged() ), this, SLOT( setDataBoundariesDirty() ) );
- disconnect( model(), SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SIGNAL( modelDataChanged() ));
- }
- QAbstractItemView::setModel( newModel );
- AttributesModel* amodel = new PrivateAttributesModel( newModel, this );
- amodel->initFrom( d->attributesModel );
- d->setAttributesModel(amodel);
- scheduleDelayedItemsLayout();
- setDataBoundariesDirty();
- if( model() )
- {
- connect( model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( columnsInserted( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( columnsRemoved( QModelIndex, int, int ) ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( modelReset() ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( layoutChanged() ), this, SLOT( setDataBoundariesDirty() ) );
- connect( model(), SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SIGNAL( modelDataChanged() ));
- }
- emit modelsChanged();
-}
-
-void AbstractDiagram::setSelectionModel( QItemSelectionModel* newSelectionModel )
-{
- if( selectionModel() )
- {
- disconnect( selectionModel(), SIGNAL( currentChanged( QModelIndex, QModelIndex ) ), this, SIGNAL( modelsChanged() ) );
- disconnect( selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ), this, SIGNAL( modelsChanged() ) );
- }
- QAbstractItemView::setSelectionModel( newSelectionModel );
- if( selectionModel() )
- {
- connect( selectionModel(), SIGNAL( currentChanged( QModelIndex, QModelIndex ) ), this, SIGNAL( modelsChanged() ) );
- connect( selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ), this, SIGNAL( modelsChanged() ) );
- }
- emit modelsChanged();
-}
-
-/*! Sets an external AttributesModel on this diagram. By default, a diagram has it's
- own internal set of attributes, but an external one can be set. This can be used to
- share attributes between several diagrams. The diagram does not take ownership of the
- attributesmodel.
-*/
-void AbstractDiagram::setAttributesModel( AttributesModel* amodel )
-{
- if( amodel->sourceModel() != model() ) {
- qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: "
- "Trying to set an attributesmodel which works on a different "
- "model than the diagram.");
- return;
- }
- if( qobject_cast(amodel) ) {
- qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: "
- "Trying to set an attributesmodel that is private to another diagram.");
- return;
- }
- d->setAttributesModel(amodel);
- scheduleDelayedItemsLayout();
- setDataBoundariesDirty();
- emit modelsChanged();
-}
-
-bool AbstractDiagram::usesExternalAttributesModel()const
-{
- return d->usesExternalAttributesModel();
-}
-
-/*! \returns a pointer to the AttributesModel currently used by this diagram. */
-AttributesModel* AbstractDiagram::attributesModel() const
-{
- return d->attributesModel;
-}
-
-QModelIndex AbstractDiagram::conditionallyMapFromSource( const QModelIndex & index ) const
-{
- Q_ASSERT( !index.isValid() || index.model() == attributesModel() || index.model() == attributesModel()->sourceModel() );
- return index.model() == attributesModel()
- ? index
- : attributesModel()->mapFromSource( index );
-}
-
-/*! \reimpl */
-void AbstractDiagram::setRootIndex ( const QModelIndex& idx )
-{
- QAbstractItemView::setRootIndex(idx);
- setAttributesModelRootIndex( d->attributesModel->mapFromSource(idx) );
-}
-
-/*! \internal */
-void AbstractDiagram::setAttributesModelRootIndex( const QModelIndex& idx )
-{
- d->attributesModelRootIndex=idx;
- setDataBoundariesDirty();
- scheduleDelayedItemsLayout();
-}
-
-/*! returns a QModelIndex pointing into the AttributesModel that corresponds to the
- root index of the diagram. */
-QModelIndex AbstractDiagram::attributesModelRootIndex() const
-{
- if ( !d->attributesModelRootIndex.isValid() )
- d->attributesModelRootIndex = d->attributesModel->mapFromSource( rootIndex() );
- return d->attributesModelRootIndex;
-}
-
-void AbstractDiagram::setCoordinatePlane( AbstractCoordinatePlane* parent )
-{
- d->plane = parent;
-}
-
-void AbstractDiagram::doItemsLayout()
-{
- if ( d->plane ) {
- d->plane->layoutDiagrams();
- update();
- }
- QAbstractItemView::doItemsLayout();
-}
-
-void AbstractDiagram::dataChanged( const QModelIndex &topLeft,
- const QModelIndex &bottomRight )
-{
- Q_UNUSED( topLeft );
- Q_UNUSED( bottomRight );
- // We are still too dumb to do intelligent updates...
- setDataBoundariesDirty();
- scheduleDelayedItemsLayout();
-}
-
-
-void AbstractDiagram::setHidden( const QModelIndex & index, bool hidden )
-{
- d->attributesModel->setData(
- conditionallyMapFromSource( index ),
- qVariantFromValue( hidden ),
- DataHiddenRole );
- emit dataHidden();
-}
-
-void AbstractDiagram::setHidden( int dataset, bool hidden )
-{
- // To store the flag for a dataset, we use the first column
- // that's associated with it. (i.e., with a dataset dimension
- // of two, the column of the keys)
- d->setDatasetAttrs( dataset, qVariantFromValue( hidden ), DataHiddenRole );
- emit dataHidden();
-}
-
-void AbstractDiagram::setHidden( bool hidden )
-{
- d->attributesModel->setModelData(
- qVariantFromValue( hidden ),
- DataHiddenRole );
- emit dataHidden();
-}
-
-bool AbstractDiagram::isHidden() const
-{
- return qVariantValue(
- attributesModel()->modelData( DataHiddenRole ) );
-}
-
-bool AbstractDiagram::isHidden( int dataset ) const
-{
- const QVariant boolFlag( d->datasetAttrs( dataset, DataHiddenRole ) );
- if( boolFlag.isValid() )
- return qVariantValue< bool >( boolFlag );
- return isHidden();
-}
-
-bool AbstractDiagram::isHidden( const QModelIndex & index ) const
-{
- return qVariantValue(
- attributesModel()->data(
- conditionallyMapFromSource(index),
- DataHiddenRole ) );
-}
-
-
-void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,
- const DataValueAttributes & a )
-{
- d->attributesModel->setData(
- conditionallyMapFromSource( index ),
- qVariantFromValue( a ),
- DataValueLabelAttributesRole );
- emit propertiesChanged();
-}
-
-
-void AbstractDiagram::setDataValueAttributes( int dataset, const DataValueAttributes & a )
-{
- d->setDatasetAttrs( dataset, qVariantFromValue( a ), DataValueLabelAttributesRole );
- emit propertiesChanged();
-}
-
-DataValueAttributes AbstractDiagram::dataValueAttributes() const
-{
- return qVariantValue(
- attributesModel()->modelData( KDChart::DataValueLabelAttributesRole ) );
-}
-
-DataValueAttributes AbstractDiagram::dataValueAttributes( int dataset ) const
-{
- /*
- The following did not work!
- (khz, 2008-01-25)
- If there was some attrs specified for the 0-th cells of a dataset,
- then this logic would return the cell's settings instead of the header settings:
-
- return qVariantValue(
- attributesModel()->data( attributesModel()->mapFromSource(columnToIndex( column )),
- KDChart::DataValueLabelAttributesRole ) );
- */
-
- const QVariant headerAttrs(
- d->datasetAttrs( dataset, KDChart::DataValueLabelAttributesRole ) );
- if( headerAttrs.isValid() )
- return qVariantValue< DataValueAttributes >( headerAttrs );
- return dataValueAttributes();
-}
-
-DataValueAttributes AbstractDiagram::dataValueAttributes( const QModelIndex & index ) const
-{
- return qVariantValue(
- attributesModel()->data(
- conditionallyMapFromSource( index ),
- KDChart::DataValueLabelAttributesRole ) );
-}
-
-void AbstractDiagram::setDataValueAttributes( const DataValueAttributes & a )
-{
- d->attributesModel->setModelData( qVariantFromValue( a ), DataValueLabelAttributesRole );
- emit propertiesChanged();
-}
-
-void AbstractDiagram::setAllowOverlappingDataValueTexts( bool allow )
-{
- d->allowOverlappingDataValueTexts = allow;
- emit propertiesChanged();
-}
-
-bool AbstractDiagram::allowOverlappingDataValueTexts() const
-{
- return d->allowOverlappingDataValueTexts;
-}
-
-void AbstractDiagram::setAntiAliasing( bool enabled )
-{
- d->antiAliasing = enabled;
- emit propertiesChanged();
-}
-
-bool AbstractDiagram::antiAliasing() const
-{
- return d->antiAliasing;
-}
-
-void AbstractDiagram::setPercentMode ( bool percent )
-{
- d->percent = percent;
- emit propertiesChanged();
-}
-
-bool AbstractDiagram::percentMode() const
-{
- return d->percent;
-}
-
-
-void AbstractDiagram::paintDataValueText( QPainter* painter,
- const QModelIndex& index,
- const QPointF& pos,
- double value )
-{
- d->paintDataValueText( this, painter, index, pos, value );
-}
-
-
-QString AbstractDiagram::roundValues( double value,
- const int decimalPos,
- const int decimalDigits ) const
-{
- return d->roundValues( value, decimalPos, decimalDigits );
-}
-
-void AbstractDiagram::paintDataValueTexts( QPainter* painter )
-{
- if ( !checkInvariants() ) return;
- const int rowCount = model()->rowCount(rootIndex());
- const int columnCount = model()->columnCount(rootIndex());
- d->clearListOfAlreadyDrawnDataValueTexts();
- for ( int i=datasetDimension()-1; iindex( j, i, rootIndex() );
- double value = model()->data( index ).toDouble();
- const QPointF pos = coordinatePlane()->translate( QPointF( j, value ) );
- paintDataValueText( painter, index, pos, value );
- }
- }
-}
-
-
-void AbstractDiagram::paintMarker( QPainter* painter,
- const DataValueAttributes& a,
- const QModelIndex& index,
- const QPointF& pos )
-{
- if ( !checkInvariants() || !a.isVisible() ) return;
- const MarkerAttributes ma = a.markerAttributes();
- if ( !ma.isVisible() ) return;
-
- const PainterSaver painterSaver( painter );
- // the size of the marker - unscaled
- const QSizeF maSize( ma.markerSize().width() / painter->matrix().m11(),
- ma.markerSize().height() / painter->matrix().m22() );
- QBrush indexBrush( brush( index ) );
- QPen indexPen( ma.pen() );
- if ( ma.markerColor().isValid() )
- indexBrush.setColor( ma.markerColor() );
-
- paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );
-
- // workaround: BC cannot be changed, otherwise we would pass the
- // index down to next-lower paintMarker function. So far, we
- // basically save a circle of radius maSize at pos in the
- // reverseMapper. This means that ^^^ this version of paintMarker
- // needs to be called to reverse-map the marker.
- d->reverseMapper.addCircle( index.row(), index.column(), pos, 2 * maSize );
-}
-
-void AbstractDiagram::paintMarker( QPainter* painter,
- const QModelIndex& index,
- const QPointF& pos )
-{
- if ( !checkInvariants() ) return;
- paintMarker( painter, dataValueAttributes( index ), index, pos );
-}
-
-void AbstractDiagram::paintMarker( QPainter* painter,
- const MarkerAttributes& markerAttributes,
- const QBrush& brush,
- const QPen& pen,
- const QPointF& pos,
- const QSizeF& maSize )
-{
- const QPen oldPen( painter->pen() );
- // Pen is used to paint 4Pixels - 1 Pixel - Ring and FastCross types.
- // make sure to use the brush color - see above in those cases.
- const bool isFourPixels = (markerAttributes.markerStyle() == MarkerAttributes::Marker4Pixels);
- if( isFourPixels || (markerAttributes.markerStyle() == MarkerAttributes::Marker1Pixel) ){
- // for high-performance point charts with tiny point markers:
- painter->setPen( PrintingParameters::scalePen( QPen( brush.color().light() ) ) );
- if( isFourPixels ){
- const qreal x = pos.x();
- const qreal y = pos.y();
- painter->drawLine( QPointF(x-1.0,y-1.0),
- QPointF(x+1.0,y-1.0) );
- painter->drawLine( QPointF(x-1.0,y),
- QPointF(x+1.0,y) );
- painter->drawLine( QPointF(x-1.0,y+1.0),
- QPointF(x+1.0,y+1.0) );
- }
- painter->drawPoint( pos );
- }else{
- const PainterSaver painterSaver( painter );
- // we only a solid line surrounding the markers
- QPen painterPen( pen );
- painterPen.setStyle( Qt::SolidLine );
- painter->setPen( PrintingParameters::scalePen( painterPen ) );
- painter->setBrush( brush );
- painter->setRenderHint ( QPainter::Antialiasing );
- painter->translate( pos );
- switch ( markerAttributes.markerStyle() ) {
- case MarkerAttributes::MarkerCircle:
- painter->drawEllipse( QRectF( 0 - maSize.height()/2, 0 - maSize.width()/2,
- maSize.height(), maSize.width()) );
- break;
- case MarkerAttributes::MarkerSquare:
- {
- QRectF rect( 0 - maSize.width()/2, 0 - maSize.height()/2,
- maSize.width(), maSize.height() );
- painter->drawRect( rect );
- break;
- }
- case MarkerAttributes::MarkerDiamond:
- {
- QVector diamondPoints;
- QPointF top, left, bottom, right;
- top = QPointF( 0, 0 - maSize.height()/2 );
- left = QPointF( 0 - maSize.width()/2, 0 );
- bottom = QPointF( 0, maSize.height()/2 );
- right = QPointF( maSize.width()/2, 0 );
- diamondPoints << top << left << bottom << right;
- painter->drawPolygon( diamondPoints );
- break;
- }
- // both handled on top of the method:
- case MarkerAttributes::Marker1Pixel:
- case MarkerAttributes::Marker4Pixels:
- break;
- case MarkerAttributes::MarkerRing:
- {
- painter->setPen( PrintingParameters::scalePen( QPen( brush.color() ) ) );
- painter->setBrush( Qt::NoBrush );
- painter->drawEllipse( QRectF( 0 - maSize.height()/2, 0 - maSize.width()/2,
- maSize.height(), maSize.width()) );
- break;
- }
- case MarkerAttributes::MarkerCross:
- {
- // Note: Markers can have outline,
- // so just drawing two rects is NOT the solution here!
- const qreal w02 = maSize.width() * 0.2;
- const qreal w05 = maSize.width() * 0.5;
- const qreal h02 = maSize.height()* 0.2;
- const qreal h05 = maSize.height()* 0.5;
- QVector crossPoints;
- QPointF p[12];
- p[ 0] = QPointF( -w02, -h05 );
- p[ 1] = QPointF( w02, -h05 );
- p[ 2] = QPointF( w02, -h02 );
- p[ 3] = QPointF( w05, -h02 );
- p[ 4] = QPointF( w05, h02 );
- p[ 5] = QPointF( w02, h02 );
- p[ 6] = QPointF( w02, h05 );
- p[ 7] = QPointF( -w02, h05 );
- p[ 8] = QPointF( -w02, h02 );
- p[ 9] = QPointF( -w05, h02 );
- p[10] = QPointF( -w05, -h02 );
- p[11] = QPointF( -w02, -h02 );
- for( int i=0; i<12; ++i )
- crossPoints << p[i];
- crossPoints << p[0];
- painter->drawPolygon( crossPoints );
- break;
- }
- case MarkerAttributes::MarkerFastCross:
- {
- QPointF left, right, top, bottom;
- left = QPointF( -maSize.width()/2, 0 );
- right = QPointF( maSize.width()/2, 0 );
- top = QPointF( 0, -maSize.height()/2 );
- bottom= QPointF( 0, maSize.height()/2 );
- painter->setPen( PrintingParameters::scalePen( QPen( brush.color() ) ) );
- painter->drawLine( left, right );
- painter->drawLine( top, bottom );
- break;
- }
- case MarkerAttributes::NoMarker:
- break;
- default:
- Q_ASSERT_X ( false, "paintMarkers()",
- "Type item does not match a defined Marker Type." );
- }
- }
- painter->setPen( oldPen );
-}
-
-void AbstractDiagram::paintMarkers( QPainter* painter )
-{
- if ( !checkInvariants() ) return;
- const int rowCount = model()->rowCount(rootIndex());
- const int columnCount = model()->columnCount(rootIndex());
- for ( int i=datasetDimension()-1; iindex( j, i, rootIndex() );
- double value = model()->data( index ).toDouble();
- const QPointF pos = coordinatePlane()->translate( QPointF( j, value ) );
- paintMarker( painter, index, pos );
- }
- }
-}
-
-
-void AbstractDiagram::setPen( const QModelIndex& index, const QPen& pen )
-{
- attributesModel()->setData(
- conditionallyMapFromSource( index ),
- qVariantFromValue( pen ), DatasetPenRole );
- emit propertiesChanged();
-}
-
-void AbstractDiagram::setPen( const QPen& pen )
-{
- attributesModel()->setModelData(
- qVariantFromValue( pen ), DatasetPenRole );
- emit propertiesChanged();
-}
-
-void AbstractDiagram::setPen( int dataset, const QPen& pen )
-{
- d->setDatasetAttrs( dataset, qVariantFromValue( pen ), DatasetPenRole );
- emit propertiesChanged();
-}
-
-QPen AbstractDiagram::pen() const
-{
- return qVariantValue(
- attributesModel()->data( DatasetPenRole ) );
-}
-
-QPen AbstractDiagram::pen( int dataset ) const
-{
- const QVariant penSettings( d->datasetAttrs( dataset, DatasetPenRole ) );
- if( penSettings.isValid() )
- return qVariantValue< QPen >( penSettings );
- return pen();
-}
-
-QPen AbstractDiagram::pen( const QModelIndex& index ) const
-{
- return qVariantValue(
- attributesModel()->data(
- conditionallyMapFromSource( index ),
- DatasetPenRole ) );
-}
-
-void AbstractDiagram::setBrush( const QModelIndex& index, const QBrush& brush )
-{
- attributesModel()->setData(
- conditionallyMapFromSource( index ),
- qVariantFromValue( brush ), DatasetBrushRole );
- emit propertiesChanged();
-}
-
-void AbstractDiagram::setBrush( const QBrush& brush )
-{
- attributesModel()->setModelData(
- qVariantFromValue( brush ), DatasetBrushRole );
- emit propertiesChanged();
-}
-
-void AbstractDiagram::setBrush( int dataset, const QBrush& brush )
-{
- d->setDatasetAttrs( dataset, qVariantFromValue( brush ), DatasetBrushRole );
- emit propertiesChanged();
-}
-
-QBrush AbstractDiagram::brush() const
-{
- return qVariantValue(
- attributesModel()->data( DatasetBrushRole ) );
-}
-
-QBrush AbstractDiagram::brush( int dataset ) const
-{
- const QVariant brushSettings( d->datasetAttrs( dataset, DatasetBrushRole ) );
- if( brushSettings.isValid() )
- return qVariantValue< QBrush >( brushSettings );
- return brush();
-}
-
-QBrush AbstractDiagram::brush( const QModelIndex& index ) const
-{
- return qVariantValue(
- attributesModel()->data( conditionallyMapFromSource( index ), DatasetBrushRole ) );
-}
-
-/**
- * Sets the unit prefix for one value
- * @param prefix the prefix to be set
- * @param column the value using that prefix
- * @param orientation the orientantion of the axis to set
- */
-void AbstractDiagram::setUnitPrefix( const QString& prefix, int column, Qt::Orientation orientation )
-{
- d->unitPrefixMap[ column ][ orientation ]= prefix;
-}
-
-/**
- * Sets the unit prefix for all values
- * @param prefix the prefix to be set
- * @param orientation the orientantion of the axis to set
- */
-void AbstractDiagram::setUnitPrefix( const QString& prefix, Qt::Orientation orientation )
-{
- d->unitPrefix[ orientation ] = prefix;
-}
-
-/**
- * Sets the unit suffix for one value
- * @param suffix the suffix to be set
- * @param column the value using that suffix
- * @param orientation the orientantion of the axis to set
- */
-void AbstractDiagram::setUnitSuffix( const QString& suffix, int column, Qt::Orientation orientation )
-{
- d->unitSuffixMap[ column ][ orientation ]= suffix;
-}
-
-/**
- * Sets the unit suffix for all values
- * @param suffix the suffix to be set
- * @param orientation the orientantion of the axis to set
- */
-void AbstractDiagram::setUnitSuffix( const QString& suffix, Qt::Orientation orientation )
-{
- d->unitSuffix[ orientation ] = suffix;
-}
-
-/**
- * Returns the unit prefix for a special value
- * @param column the value which's prefix is requested
- * @param orientation the orientation of the axis
- * @param fallback if true, the global prefix is return when no specific one is set for that value
- * @return the unit prefix
- */
-QString AbstractDiagram::unitPrefix( int column, Qt::Orientation orientation, bool fallback ) const
-{
- if( !fallback || d->unitPrefixMap[ column ].contains( orientation ) )
- return d->unitPrefixMap[ column ][ orientation ];
- return d->unitPrefix[ orientation ];
-}
-
-/** Returns the global unit prefix
- * @param orientation the orientation of the axis
- * @return the unit prefix
- */
-QString AbstractDiagram::unitPrefix( Qt::Orientation orientation ) const
-{
- return d->unitPrefix[ orientation ];
-}
-
-/**
- * Returns the unit suffix for a special value
- * @param column the value which's suffix is requested
- * @param orientation the orientation of the axis
- * @param fallback if true, the global suffix is return when no specific one is set for that value
- * @return the unit suffix
- */
-QString AbstractDiagram::unitSuffix( int column, Qt::Orientation orientation, bool fallback ) const
-{
- if( !fallback || d->unitSuffixMap[ column ].contains( orientation ) )
- return d->unitSuffixMap[ column ][ orientation ];
- return d->unitSuffix[ orientation ];
-}
-
-/** Returns the global unit suffix
- * @param orientation the orientation of the axis
- * @return the unit siffix
- */
-QString AbstractDiagram::unitSuffix( Qt::Orientation orientation ) const
-{
- return d->unitSuffix[ orientation ];
-}
-
-// implement QAbstractItemView:
-QRect AbstractDiagram::visualRect( const QModelIndex &index ) const
-{
- return d->reverseMapper.boundingRect( index.row(), index.column() ).toRect();
-}
-
-void AbstractDiagram::scrollTo(const QModelIndex &, ScrollHint )
-{}
-
-// indexAt ... down below
-
-QModelIndex AbstractDiagram::moveCursor(CursorAction, Qt::KeyboardModifiers )
-{ return QModelIndex(); }
-
-int AbstractDiagram::horizontalOffset() const
-{ return 0; }
-
-int AbstractDiagram::verticalOffset() const
-{ return 0; }
-
-bool AbstractDiagram::isIndexHidden(const QModelIndex &) const
-{ return true; }
-
-void AbstractDiagram::setSelection(const QRect& rect , QItemSelectionModel::SelectionFlags command )
-{
- const QModelIndexList indexes = d->indexesIn( rect );
- QItemSelection selection;
- KDAB_FOREACH( const QModelIndex& index, indexes )
- {
- selection.append( QItemSelectionRange( index ) );
- }
- selectionModel()->select( selection, command );
-}
-
-QRegion AbstractDiagram::visualRegionForSelection(const QItemSelection &selection) const
-{
- QPolygonF polygon;
- KDAB_FOREACH( const QModelIndex& index, selection.indexes() )
- {
- polygon << d->reverseMapper.polygon(index.row(), index.column());
- }
- return polygon.isEmpty() ? QRegion() : QRegion( polygon.toPolygon() );
-}
-
-QRegion AbstractDiagram::visualRegion(const QModelIndex &index) const
-{
- QPolygonF polygon = d->reverseMapper.polygon(index.row(), index.column());
- return polygon.isEmpty() ? QRegion() : QRegion( polygon.toPolygon() );
-}
-
-void KDChart::AbstractDiagram::useDefaultColors( )
-{
- d->attributesModel->setPaletteType( AttributesModel::PaletteTypeDefault );
-}
-
-void KDChart::AbstractDiagram::useSubduedColors( )
-{
- d->attributesModel->setPaletteType( AttributesModel::PaletteTypeSubdued );
-}
-
-void KDChart::AbstractDiagram::useRainbowColors( )
-{
- d->attributesModel->setPaletteType( AttributesModel::PaletteTypeRainbow );
-}
-
-QStringList AbstractDiagram::itemRowLabels() const
-{
- QStringList ret;
- if( model() ){
- //qDebug() << "AbstractDiagram::itemRowLabels(): " << attributesModel()->rowCount(attributesModelRootIndex()) << "entries";
- const int rowCount = attributesModel()->rowCount(attributesModelRootIndex());
- for( int i = 0; i < rowCount; ++i ){
- //qDebug() << "item row label: " << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();
- ret << unitPrefix( i, Qt::Horizontal, true ) +
- attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString() +
- unitSuffix( i, Qt::Horizontal, true );
- }
- }
- return ret;
-}
-
-QStringList AbstractDiagram::datasetLabels() const
-{
- QStringList ret;
- if( model() == 0 )
- return ret;
-
- const int columnCount = attributesModel()->columnCount(attributesModelRootIndex());
- for( int i = 0; i < columnCount; i += datasetDimension() )
- ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();
-
- return ret;
-}
-
-QList AbstractDiagram::datasetBrushes() const
-{
- QList ret;
- if( model() == 0 )
- return ret;
-
- const int datasetCount = attributesModel()->columnCount(attributesModelRootIndex()) / datasetDimension();
- for ( int dataset = 0; dataset < datasetCount; dataset++ )
- ret << brush( dataset );
-
- return ret;
-}
-
-QList AbstractDiagram::datasetPens() const
-{
- QList ret;
- if( model() == 0 )
- return ret;
-
- const int datasetCount = attributesModel()->columnCount(attributesModelRootIndex()) / datasetDimension();
- for ( int dataset = 0; dataset < datasetCount; dataset++ )
- ret << pen( dataset );
-
- return ret;
-}
-
-QList AbstractDiagram::datasetMarkers() const
-{
- QList ret;
- if( model() == 0 )
- return ret;
-
- const int datasetCount = attributesModel()->columnCount(attributesModelRootIndex()) / datasetDimension();
- for ( int dataset = 0; dataset < datasetCount; dataset++ )
- ret << dataValueAttributes( dataset ).markerAttributes();
-
- return ret;
-}
-
-bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const
-{
- if( ! justReturnTheStatus ){
- Q_ASSERT_X ( model(), "AbstractDiagram::checkInvariants()",
- "There is no usable model set, for the diagram." );
-
- Q_ASSERT_X ( coordinatePlane(), "AbstractDiagram::checkInvariants()",
- "There is no usable coordinate plane set, for the diagram." );
- }
- return model() && coordinatePlane();
-}
-
-int AbstractDiagram::datasetDimension( ) const
-{
- return d->datasetDimension;
-}
-
-void AbstractDiagram::setDatasetDimension( int dimension )
-{
- Q_UNUSED( dimension );
- qDebug() << "Setting the dataset dimension using AbstractDiagram::setDatasetDimension is obsolete. Use the specific diagram types instead.";
-}
-
-void AbstractDiagram::setDatasetDimensionInternal( int dimension )
-{
- Q_ASSERT( dimension != 0 );
-
- if ( d->datasetDimension == dimension ) return;
- d->datasetDimension = dimension;
- setDataBoundariesDirty();
- emit layoutChanged( this );
-}
-
-double AbstractDiagram::valueForCell( int row, int column ) const
-{
- return d->attributesModel->data(
- d->attributesModel->index( row, column, attributesModelRootIndex() ) ).toDouble();
-}
-
-void AbstractDiagram::update() const
-{
- //qDebug("KDChart::AbstractDiagram::update() called");
- if( d->plane )
- d->plane->update();
-}
-
-QModelIndex AbstractDiagram::indexAt( const QPoint& point ) const
-{
- return d->indexAt( point );
-}
-
-QModelIndexList AbstractDiagram::indexesAt( const QPoint& point ) const
-{
- return d->indexesAt( point );
-}
-
diff --git a/lib/libkdchart/src/KDChartAbstractDiagram.h b/lib/libkdchart/src/KDChartAbstractDiagram.h
deleted file mode 100644
index 2e21cf6..0000000
--- a/lib/libkdchart/src/KDChartAbstractDiagram.h
+++ /dev/null
@@ -1,731 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTDIAGRAM_H
-#define KDCHARTABSTRACTDIAGRAM_H
-
-#include
-#include
-#include
-
-#include "KDChartGlobal.h"
-#include "KDChartMarkerAttributes.h"
-#include "KDChartAttributesModel.h"
-
-namespace KDChart {
-
- class AbstractCoordinatePlane;
- class AttributesModel;
- class DataValueAttributes;
- class PaintContext;
-
- /**
- * @brief AbstractDiagram defines the interface for diagram classes
- *
- * AbstractDiagram is the base class for diagram classes ("chart types").
- *
- * It defines the interface, that needs to be implemented for the diagram,
- * to function within the KDChart framework. It extends Interview's
- * QAbstractItemView.
- */
- class KDCHART_EXPORT AbstractDiagram : public QAbstractItemView
- {
- Q_OBJECT
- Q_DISABLE_COPY( AbstractDiagram )
- KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC( AbstractDiagram )
-
- friend class AbstractCoordinatePlane;
- friend class CartesianCoordinatePlane;
- friend class PolarCoordinatePlane;
-
- protected:
- explicit inline AbstractDiagram(
- Private *p, QWidget* parent, AbstractCoordinatePlane* plane );
- explicit AbstractDiagram (
- QWidget* parent = 0, AbstractCoordinatePlane* plane = 0 );
- public:
- virtual ~AbstractDiagram();
-
-
- /**
- * Returns true if both diagrams have the same settings.
- */
- bool compare( const AbstractDiagram* other )const;
-
-
- /**
- * @brief Return the bottom left and top right data point, that the
- * diagram will display (unless the grid adjusts these values).
- *
- * This method returns a chached result of calculations done by
- * calculateDataBoundaries.
- * Classes derived from AbstractDiagram must implement the
- * calculateDataBoundaries function, to specify their own
- * way of calculating the data boundaries.
- * If derived classes want to force recalculation of the
- * data boundaries, they can call setDataBoundariesDirty()
- *
- * Returned value is in diagram coordinates.
- */
- const QPair dataBoundaries() const;
-
- // protected: // FIXME: why should that be private? (Mirko)
- /**
- * Draw the diagram contents to the rectangle and painter, that are
- * passed in as part of the paint context.
- *
- * @param paintContext All information needed for painting.
- */
- virtual void paint ( PaintContext* paintContext ) = 0;
-
- /**
- * Called by the widget's sizeEvent. Adjust all internal structures,
- * that are calculated, dependending on the size of the widget.
- *
- * @param area
- */
- virtual void resize ( const QSizeF& area ) = 0;
-
- /** Associate a model with the diagram. */
- virtual void setModel ( QAbstractItemModel * model );
-
- /** Associate a seleection model with the diagrom. */
- virtual void setSelectionModel( QItemSelectionModel* selectionModel );
-
- /**
- * Associate an AttributesModel with this diagram. Note that
- * the diagram does _not_ take ownership of the AttributesModel.
- * This should thus only be used with AttributesModels that
- * have been explicitly created by the user, and are owned
- * by her. Setting an AttributesModel that is internal to
- * another diagram is an error.
- *
- * Correct:
- *
- * \code
- * AttributesModel *am = new AttributesModel( model, 0 );
- * diagram1->setAttributesModel( am );
- * diagram2->setAttributesModel( am );
- *
- * \endcode
- *
- * Wrong:
- *
- * \code
- *
- * diagram1->setAttributesModel( diagram2->attributesModel() );
- *
- * \endcode
- *
- * @param model The AttributesModel to use for this diagram.
- * @see AttributesModel, usesExternalAttributesModel
- */
- virtual void setAttributesModel( AttributesModel* model );
-
- /**
- * Returns whether the diagram is using its own built-in attributes model
- * or an attributes model that was set via setAttributesModel.
- *
- * @see setAttributesModel
- */
- virtual bool usesExternalAttributesModel()const;
-
- /**
- * Returns the AttributesModel, that is used by this diagram.
- * By default each diagram owns its own AttributesModel, which
- * should never be deleted. Only if a user-supplied AttributesModel
- * has been set does the pointer returned here not belong to the
- * diagram.
- *
- * @return The AttributesModel associated with the diagram.
- * @see setAttributesModel
- */
- virtual AttributesModel* attributesModel() const;
-
- /** Set the root index in the model, where the diagram starts
- * referencing data for display. */
- virtual void setRootIndex ( const QModelIndex& idx );
-
- /** \reimpl */
- virtual QRect visualRect(const QModelIndex &index) const;
- /** \reimpl */
- virtual void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible);
- /** \reimpl */
- virtual QModelIndex indexAt(const QPoint &point) const;
- /** \reimpl */
- virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
- /** \reimpl */
- virtual int horizontalOffset() const;
- /** \reimpl */
- virtual int verticalOffset() const;
- /** \reimpl */
- virtual bool isIndexHidden(const QModelIndex &index) const;
- /** \reimpl */
- virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command);
- /** \reimpl */
- virtual QRegion visualRegionForSelection(const QItemSelection &selection) const;
- virtual QRegion visualRegion(const QModelIndex &index) const;
- /** \reimpl */
- virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- /** \reimpl */
- virtual void doItemsLayout();
-
- /**
- * The coordinate plane associated with the diagram. This determines
- * how coordinates in value space are mapped into pixel space. By default
- * this is a CartesianCoordinatePlane.
- * @return The coordinate plane associated with the diagram.
- */
- AbstractCoordinatePlane* coordinatePlane() const;
-
- /**
- * Set the coordinate plane associated with the diagram. This determines
- * how coordinates in value space are mapped into pixel space. The chart
- * takes ownership.
- * @return The coordinate plane associated with the diagram.
- */
- virtual void setCoordinatePlane( AbstractCoordinatePlane* plane );
-
-
- /**
- * Hide (or unhide, resp.) a data cell.
- *
- * \note Hidden data are still taken into account by the coordinate plane,
- * so neither the grid nor your axes' ranges will change, when you hide data.
- * For totally removing data from KD Chart's view you can use another approach:
- * e.g. you could define a proxy model on top of your data model, and register
- * the proxy model calling setModel() instead of registering your real data model.
- *
- * @param index The datapoint to set the hidden status for. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @param hidden The hidden status to set.
- */
- void setHidden( const QModelIndex & index, bool hidden );
-
- /**
- * Hide (or unhide, resp.) a dataset.
- *
- * \note Hidden data are still taken into account by the coordinate plane,
- * so neither the grid nor your axes' ranges will change, when you hide data.
- * For totally removing data from KD Chart's view you can use another approach:
- * e.g. you could define a proxy model on top of your data model, and register
- * the proxy model calling setModel() instead of registering your real data model.
- *
- * @param dataset The dataset to set the hidden status for.
- * @param hidden The hidden status to set.
- */
- void setHidden( int dataset, bool hidden );
-
- /**
- * Hide (or unhide, resp.) all datapoints in the model.
- *
- * \note Hidden data are still taken into account by the coordinate plane,
- * so neither the grid nor your axes' ranges will change, when you hide data.
- * For totally removing data from KD Chart's view you can use another approach:
- * e.g. you could define a proxy model on top of your data model, and register
- * the proxy model calling setModel() instead of registering your real data model.
- *
- * @param hidden The hidden status to set.
- */
- void setHidden( bool hidden );
-
- /**
- * Retrieve the hidden status specified globally. This will fall
- * back automatically to the default settings ( = not hidden), if there
- * are no specific settings.
- * @return The global hidden status.
- */
- bool isHidden() const;
-
- /**
- * Retrieve the hidden status for the given dataset. This will fall
- * back automatically to what was set at diagram level, if there
- * are no dataset specific settings.
- * @param dataset The dataset to retrieve the hidden status for.
- * @return The hidden status for the given dataset.
- */
- bool isHidden( int dataset ) const;
-
- /**
- * Retrieve the hidden status for the given index. This will fall
- * back automatically to what was set at dataset or diagram level, if there
- * are no datapoint specific settings.
- * @param index The datapoint to retrieve the hidden status for.
- * @return The hidden status for the given index.
- */
- bool isHidden( const QModelIndex & index ) const;
-
-
- /**
- * Set the DataValueAttributes for the given index.
- * @param index The datapoint to set the attributes for. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @param a The attributes to set.
- */
- void setDataValueAttributes( const QModelIndex & index,
- const DataValueAttributes & a );
-
- /**
- * Set the DataValueAttributes for the given dataset.
- * @param dataset The dataset to set the attributes for.
- * @param a The attributes to set.
- */
- void setDataValueAttributes( int dataset, const DataValueAttributes & a );
-
- /**
- * Set the DataValueAttributes for all datapoints in the model.
- * @param a The attributes to set.
- */
- void setDataValueAttributes( const DataValueAttributes & a );
-
- /**
- * Retrieve the DataValueAttributes specified globally. This will fall
- * back automatically to the default settings, if there
- * are no specific settings.
- * @return The global DataValueAttributes.
- */
- DataValueAttributes dataValueAttributes() const;
-
- /**
- * Retrieve the DataValueAttributes for the given dataset. This will fall
- * back automatically to what was set at model level, if there
- * are no dataset specific settings.
- * @param dataset The dataset to retrieve the attributes for.
- * @return The DataValueAttributes for the given dataset.
- */
- DataValueAttributes dataValueAttributes( int dataset ) const;
-
- /**
- * Retrieve the DataValueAttributes for the given index. This will fall
- * back automatically to what was set at dataset or model level, if there
- * are no datapoint specific settings.
- * @param index The datapoint to retrieve the attributes for. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @return The DataValueAttributes for the given index.
- */
- DataValueAttributes dataValueAttributes( const QModelIndex & index ) const;
-
- /**
- * Set the pen to be used, for painting the datapoint at the given index.
- * @param index The datapoint's index in the model. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @param pen The pen to use.
- */
- void setPen( const QModelIndex& index, const QPen& pen );
-
- /**
- * Set the pen to be used, for painting the given dataset.
- * @param dataset The dataset to set the pen for.
- * @param pen The pen to use.
- */
- void setPen( int dataset, const QPen& pen );
-
- /**
- * Set the pen to be used, for painting all datasets in the model.
- * @param pen The pen to use.
- */
- void setPen( const QPen& pen );
-
- /**
- * Retrieve the pen to be used for painting datapoints globally. This will fall
- * back automatically to the default settings, if there
- * are no specific settings.
- * @return The pen to use for painting.
- */
- QPen pen() const;
- /**
- * Retrieve the pen to be used for the given dataset. This will fall
- * back automatically to what was set at model level, if there
- * are no dataset specific settings.
- * @param dataset The dataset to retrieve the pen for.
- * @return The pen to use for painting.
- */
- QPen pen( int dataset ) const;
- /**
- * Retrieve the pen to be used, for painting the datapoint at the given
- * index in the model.
- * @param index The index of the datapoint in the model. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @return The pen to use for painting.
- */
- QPen pen( const QModelIndex& index ) const;
-
- /**
- * Set the brush to be used, for painting the datapoint at the given index.
- * @param index The datapoint's index in the model. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @param brush The brush to use.
- */
- void setBrush( const QModelIndex& index, const QBrush& brush);
-
- /**
- * Set the brush to be used, for painting the given dataset.
- * @param dataset The dataset to set the brush for.
- * @param brush The brush to use.
- */
- void setBrush( int dataset, const QBrush& brush );
-
- /**
- * Set the brush to be used, for painting all datasets in the model.
- * @param brush The brush to use.
- */
- void setBrush( const QBrush& brush);
-
- /**
- * Retrieve the brush to be used for painting datapoints globally. This will fall
- * back automatically to the default settings, if there
- * are no specific settings.
- * @return The brush to use for painting.
- */
- QBrush brush() const;
- /**
- * Retrieve the brush to be used for the given dataset. This will fall
- * back automatically to what was set at model level, if there
- * are no dataset specific settings.
- * @param dataset The dataset to retrieve the brush for.
- * @return The brush to use for painting.
- */
- QBrush brush( int dataset ) const;
- /**
- * Retrieve the brush to be used, for painting the datapoint at the given
- * index in the model.
- * @param index The index of the datapoint in the model. With a dataset dimension
- * of two, this is the index of the key of each key/value pair.
- * @return The brush to use for painting.
- */
- QBrush brush( const QModelIndex& index ) const;
-
- /**
- * Set the unit prefix to be used on axes for one specific column.
- * @param prefix The prefix to be used.
- * @param column The column which should be set.
- * @param orientation The orientation of the axis to use.
- */
- void setUnitPrefix( const QString& prefix, int column, Qt::Orientation orientation );
- /**
- * Set the unit prefix to be used on axes for all columns.
- * @param prefix The prefix to be used.
- * @param orientation The orientation of the axis to use.
- */
- void setUnitPrefix( const QString& prefix, Qt::Orientation orientation );
-
- /**
- * Set the unit prefix to be used on axes for one specific column.
- * @param suffix The suffix to be used.
- * @param column The column which should be set.
- * @param orientation The orientation of the axis to use.
- */
- void setUnitSuffix( const QString& suffix, int column, Qt::Orientation orientation );
- /**
- * Set the unit prefix to be used on axes for all columns.
- * @param suffix The suffix to be used.
- * @param orientation The orientation of the axis to use.
- */
- void setUnitSuffix( const QString& suffix, Qt::Orientation orientation );
-
- /**
- * Retrieves the axis unit prefix for a specific column.
- * @param column The column whose prefix should be retrieved.
- * @param orientation The orientation of the axis.
- * @param fallback If true, the prefix for all columns is returned, when
- * none is set for the selected column.
- * @return The axis unit prefix.
- */
- QString unitPrefix( int column, Qt::Orientation orientation, bool fallback = false ) const;
- /**
- * Retrieves the axis unit prefix.
- * @param orientation The orientation of the axis.
- * @return The axis unit prefix.
- */
- QString unitPrefix( Qt::Orientation orientation ) const;
-
- /**
- * Retrieves the axis unit suffix for a specific column.
- * @param column The column whose prefix should be retrieved.
- * @param orientation The orientation of the axis.
- * @param fallback If true, the suffix for all columns is returned, when
- * none is set for the selected column.
- * @return The axis unit suffix.
- */
- QString unitSuffix( int column, Qt::Orientation orientation, bool fallback = false ) const;
- /**
- * Retrieves the axis unit suffix.
- * @param orientation The orientation of the axis.
- * @return The axis unit suffix.
- */
- QString unitSuffix( Qt::Orientation orientation ) const;
-
- /**
- * Set whether data value labels are allowed to overlap.
- * @param allow True means that overlapping labels are allowed.
- */
- void setAllowOverlappingDataValueTexts( bool allow );
-
- /**
- * @return Whether data value labels are allowed to overlap.
- */
- bool allowOverlappingDataValueTexts() const;
-
- /**
- * Set whether anti-aliasing is to be used while rendering
- * this diagram.
- * @param enabled True means that AA is enabled.
- */
- void setAntiAliasing( bool enabled );
-
- /**
- * @return Whether anti-aliasing is to be used for rendering
- * this diagram.
- */
- bool antiAliasing() const;
-
- /**
- * Set the palette to be used, for painting datasets to the default
- * palette.
- * @see KDChart::Palette.
- * FIXME: fold into one usePalette (KDChart::Palette&) method
- */
- void useDefaultColors();
-
- /**
- * Set the palette to be used, for painting datasets to the rainbow
- * palette.
- * @see KDChart::Palette.
- */
- void useRainbowColors();
-
- /**
- * Set the palette to be used, for painting datasets to the subdued
- * palette.
- * @see KDChart::Palette.
- */
- void useSubduedColors();
-
- /**
- * The set of item row labels currently displayed, for use in Abscissa axes, etc.
- * @return The set of item row labels currently displayed.
- */
- QStringList itemRowLabels() const;
-
- /**
- * The set of dataset labels currently displayed, for use in legends, etc.
- * @return The set of dataset labels currently displayed.
- */
- QStringList datasetLabels() const;
-
- /**
- * The set of dataset brushes currently used, for use in legends, etc.
- *
- * @note Cell-level override brushes, if set, take precedence over the
- * dataset values, so you might need to check these too, in order to find
- * the brush, that is used for a single cell.
- *
- * @return The current set of dataset brushes.
- */
- QList datasetBrushes() const;
-
- /**
- * The set of dataset pens currently used, for use in legends, etc.
- *
- * @note Cell-level override pens, if set, take precedence over the
- * dataset values, so you might need to check these too, in order to find
- * the pens, that is used for a single cell.
- *
- * @return The current set of dataset pens.
- */
- QList datasetPens() const;
-
- /**
- * The set of dataset markers currently used, for use in legends, etc.
- *
- * @note Cell-level override markers, if set, take precedence over the
- * dataset values, so you might need to check these too, in order to find
- * the marker, that is shown for a single cell.
- *
- * @return The current set of dataset brushes.
- */
- QList datasetMarkers() const;
-
-
- /**
- * \deprecated
- *
- * \brief Deprecated method that turns the percent mode of this diagram on or off.
- *
- * This method is deprecated. Use the setType() method of a supporting diagram implementation
- * instead, e.g. BarDiagram::setType().
- *
- * \see percentMode
- */
- void setPercentMode( bool percent );
-
-
- /**
- * \brief Returns whether this diagram is drawn in percent mode.
- *
- * If true, all data points in the same column of a diagram will
- * be be drawn at the same X coordinate and stacked up so that the distance from the
- * last data point (or the zero line) to a data point P is always the ratio of (Y-Value of P)/
- * (sum of all Y-Values in same column as P) relative to the diagrams height
- * (or width, if abscissa and ordinate are swapped).
- *
- * Note that this property is not applicable to all diagram types.
- */
- bool percentMode() const;
-
- virtual void paintMarker( QPainter* painter,
- const MarkerAttributes& markerAttributes,
- const QBrush& brush, const QPen&,
- const QPointF& point, const QSizeF& size );
-
- /**
- * The dataset dimension of a diagram determines, how many value dimensions
- * it expects each datapoint to have.
- * For each dimension it will expect one column of values in the model.
- * If the dimensionality is 1, automatic values will be used for the abscissa.
- *
- * For example a diagram with the default dimension of 1, will have one column
- * per datapoint (the y values) and will use automatic values for the x axis
- * (1, 2, 3, ... n).
- * If the dimension is 2, the diagram will use the first, (and the third,
- * fifth, etc) columns as X values, and the second, (and the fourth, sixth,
- * etc) column as Y values.
- * @return The dataset dimension of the diagram.
- */
- int datasetDimension() const;
-
- /**
- * \deprecated
- *
- * Sets the dataset dimension of the diagram. Using this method
- * is deprecated. Use the specific diagram types instead.
- */
- void setDatasetDimension( int dimension );
-
- protected:
- void setDatasetDimensionInternal( int dimension );
-
- public:
- void update() const;
-
- void paintMarker( QPainter* painter, const DataValueAttributes& a,
- const QModelIndex& index,
- const QPointF& pos );
- void paintMarker( QPainter* painter,
- const QModelIndex& index,
- const QPointF& pos );
- void paintDataValueText( QPainter* painter, const QModelIndex& index,
- const QPointF& pos, double value );
-
- // reverse mapping:
- /** This method is added alongside with indexAt from QAIM,
- since in kdchart multiple indexes can be displayed at the same
- spot. */
- QModelIndexList indexesAt( const QPoint& point ) const;
-
- protected:
- virtual bool checkInvariants( bool justReturnTheStatus=false ) const;
- virtual const QPair calculateDataBoundaries() const = 0;
-
- protected Q_SLOTS:
- void setDataBoundariesDirty() const;
-
- protected:
- /**
- * \deprecated
- * This method is deprecated and provided for backward-compatibility only.
- * Your own diagram classes should call
- * d->paintDataValueTextsAndMarkers() instead
- * which also is taking care for showing your cell-specific comments, if any,
- */
- virtual void paintDataValueTexts( QPainter* painter );
- /**
- * \deprecated
- * This method is deprecated and provided for backward-compatibility only.
- * Your own diagram classes should call
- * d->paintDataValueTextsAndMarkers() instead
- * which also is taking care for showing your cell-specific comments, if any,
- */
- virtual void paintMarkers( QPainter* painter );
- void setAttributesModelRootIndex( const QModelIndex& );
- QModelIndex attributesModelRootIndex() const;
-
- /**
- * Helper method, retrieving the data value (DisplayRole) for a given row and column
- * @param row The row to query.
- * @param column The column to query.
- * @return The value of the display role at the given row and column as a double.
- * @deprecated
- */
- double valueForCell( int row, int column ) const;
-
- Q_SIGNALS:
- /** Diagrams are supposed to emit this signal, when the layout of one
- of their element changes. Layouts can change, for example, when
- axes are added or removed, or when the configuration was changed
- in a way that the axes or the diagram itself are displayed in a
- different geometry.
- Changes in the diagrams coordinate system also result
- in the layoutChanged() signal being emitted.
- */
- void layoutChanged( AbstractDiagram* );
-
- /**
- * This signal is emitted when this diagram is being destroyed, but before all the
- * data, i.e. the attributes model, is invalidated.
- */
- void aboutToBeDestroyed();
-
- /** This signal is emitted, when either the model or the AttributesModel is replaced. */
- void modelsChanged();
-
- /** This signal is emitted, when the model data is changed. */
- void modelDataChanged();
-
- /** This signal is emitted, when the hidden status of at least one data cell was (un)set. */
- void dataHidden();
-
- /** Emitted upon change of a property of the Diagram. */
- void propertiesChanged();
-
- private:
- QModelIndex conditionallyMapFromSource( const QModelIndex & sourceIndex ) const;
- QString roundValues( double value, const int decimalPos,
- const int decimalDigits ) const;
-
- };
-
- typedef QList AbstractDiagramList;
- typedef QList ConstAbstractDiagramList;
-
- /**
- * @brief Internally used class just adding a special constructor used by AbstractDiagram
- */
- class PrivateAttributesModel : public AttributesModel {
- Q_OBJECT
- public:
- explicit PrivateAttributesModel( QAbstractItemModel* model, QObject * parent = 0 )
- : AttributesModel(model,parent) {}
- };
-}
-
-#endif
diff --git a/lib/libkdchart/src/KDChartAbstractDiagram_p.h b/lib/libkdchart/src/KDChartAbstractDiagram_p.h
deleted file mode 100644
index 49158ce..0000000
--- a/lib/libkdchart/src/KDChartAbstractDiagram_p.h
+++ /dev/null
@@ -1,546 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTDIAGRAM_P_H
-#define KDCHARTABSTRACTDIAGRAM_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "KDChartAbstractDiagram.h"
-#include "KDChartAbstractCoordinatePlane.h"
-#include "KDChartDataValueAttributes.h"
-#include "KDChartBackgroundAttributes"
-#include "KDChartRelativePosition.h"
-#include "KDChartPosition.h"
-#include "KDChartPainterSaver_p.h"
-#include "KDChartPaintContext.h"
-#include "KDChartPrintingParameters.h"
-#include "KDChartChart.h"
-#include
-#include "Scenery/ReverseMapper.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-
-namespace KDChart {
- class AttributesModel;
-
- class DataValueTextInfo {
- public:
- DataValueTextInfo(){}
- DataValueTextInfo( const QModelIndex& _index, const DataValueAttributes& _attrs, const QPointF& _pos, const QPointF& _markerPos, double _value )
- :index( _index), attrs( _attrs ), pos( _pos ), markerPos( _markerPos ), value( _value )
- {}
- DataValueTextInfo( const DataValueTextInfo& other )
- :index( other.index ), attrs( other.attrs ), pos( other.pos ), markerPos( other.markerPos ), value( other.value ) {}
- QModelIndex index;
- DataValueAttributes attrs;
- QPointF pos;
- QPointF markerPos;
- double value;
- };
-
- typedef QVector DataValueTextInfoList;
- typedef QVectorIterator DataValueTextInfoListIterator;
-
-
-/**
- * \internal
- */
- class KDChart::AbstractDiagram::Private
- {
- friend class AbstractDiagram;
- public:
- explicit Private();
- virtual ~Private();
-
- Private( const Private& rhs );
-
- void setAttributesModel( AttributesModel* );
-
- bool usesExternalAttributesModel()const;
-
- // FIXME: Optimize if necessary
- virtual qreal calcPercentValue( const QModelIndex & index )
- {
- qreal sum = 0.0;
- for ( int col = 0; col < attributesModel->columnCount( QModelIndex() ); col++ )
- sum += attributesModel->data( attributesModel->index( index.row(), col, QModelIndex() ) ).toDouble();
- if ( sum == 0.0 )
- return 0.0;
- return attributesModel->data( attributesModel->mapFromSource( index ) ).toDouble() / sum * 100.0;
- }
-
- void appendDataValueTextInfoToList(
- AbstractDiagram * diagram,
- DataValueTextInfoList & list,
- const QModelIndex & index,
- const CartesianDiagramDataCompressor::CachePosition * position,
- const PositionPoints& points,
- const Position& autoPositionPositive,
- const Position& autoPositionNegative,
- const qreal value )
- {
- CartesianDiagramDataCompressor::DataValueAttributesList allAttrs( aggregatedAttrs( diagram, index, position ) );
- QMap::const_iterator i;
- for (i = allAttrs.constBegin(); i != allAttrs.constEnd(); ++i){
- if( i.value().isVisible() ){
- const bool bValueIsPositive = (value >= 0.0);
- RelativePosition relPos( i.value().position( bValueIsPositive ) );
- relPos.setReferencePoints( points );
- if( relPos.referencePosition().isUnknown() )
- relPos.setReferencePosition( bValueIsPositive ? autoPositionPositive : autoPositionNegative );
-
- const QPointF referencePoint = relPos.referencePoint();
- if( diagram->coordinatePlane()->isVisiblePoint( referencePoint ) ){
- const qreal fontHeight = cachedFontMetrics( i.value().textAttributes().
- calculatedFont( plane, KDChartEnums::MeasureOrientationMinimum ), diagram )->height();
- // Note: When printing data value texts the font height is used as reference size for both,
- // horizontal and vertical padding, if the respective padding's Measure is using
- // automatic reference area detection.
- QSizeF relativeMeasureSize( fontHeight, fontHeight );
- //qDebug()<<"fontHeight"<= decimalDigits ; --i ) {
- count += 1;
- int lastval = QString( digits.data() [i] ).toInt();
- int val = QString( digits.data() [i-1] ) .toInt();
- if ( lastval >= 5 ) {
- val += 1;
- digits.replace( digits.length() - count,1 , QString::number( val ) );
- }
- }
-
- digits.truncate( decimalDigits );
- num.append( QLatin1Char( '.' ) + digits );
-
- return num;
-
- }
-
- void clearListOfAlreadyDrawnDataValueTexts()
- {
- alreadyDrawnDataValueTexts.clear();
- }
-
- void paintDataValueTextsAndMarkers( AbstractDiagram* diag,
- PaintContext* ctx,
- const DataValueTextInfoList & list,
- bool paintMarkers,
- bool justCalculateRect=false,
- QRectF* cumulatedBoundingRect=0 )
- {
- const PainterSaver painterSaver( ctx->painter() );
- ctx->painter()->setClipping( false );
- if( paintMarkers && ! justCalculateRect )
- {
- DataValueTextInfoListIterator it( list );
- while ( it.hasNext() ) {
- const DataValueTextInfo& info = it.next();
- diag->paintMarker( ctx->painter(), info.index, info.markerPos );
- }
- }
- DataValueTextInfoListIterator it( list );
-
- Measure m( 18.0, KDChartEnums::MeasureCalculationModeRelative,
- KDChartEnums::MeasureOrientationMinimum );
- m.setReferenceArea( ctx->coordinatePlane() );
- TextAttributes ta;
- ta.setFontSize( m );
- m.setAbsoluteValue( 6.0 );
- ta.setMinimalFontSize( m );
- clearListOfAlreadyDrawnDataValueTexts();
- while ( it.hasNext() ) {
- const DataValueTextInfo& info = it.next();
- paintDataValueText( diag, ctx->painter(), info.index, info.pos, info.value,
- justCalculateRect,
- cumulatedBoundingRect );
-
- const QString comment = info.index.data( KDChart::CommentRole ).toString();
- if( comment.isEmpty() )
- continue;
- TextBubbleLayoutItem item( comment,
- ta,
- ctx->coordinatePlane()->parent(),
- KDChartEnums::MeasureOrientationMinimum,
- Qt::AlignHCenter|Qt::AlignVCenter );
- const QRect rect( info.pos.toPoint(), item.sizeHint() );
- if( justCalculateRect && cumulatedBoundingRect ){
- (*cumulatedBoundingRect) |= rect;
- }else{
- item.setGeometry( rect );
- item.paint( ctx->painter() );
-
- // Return the cumulatedBoundingRect if asked for
- if(cumulatedBoundingRect)
- (*cumulatedBoundingRect) |= rect;
- }
- }
- }
-
-
- void paintDataValueText( const AbstractDiagram* diag,
- QPainter* painter,
- const QModelIndex& index,
- const QPointF& pos,
- double value,
- bool justCalculateRect=false,
- QRectF* cumulatedBoundingRect=0 )
- {
- const DataValueAttributes a( diag->dataValueAttributes( index ) );
-
- if ( !a.isVisible() ) return;
-
- if ( a.usePercentage() )
- value = calcPercentValue( index );
-
- // handle decimal digits
- int decimalDigits = a.decimalDigits();
- int decimalPos = QString::number( value ).indexOf( QLatin1Char( '.' ) );
- QString roundedValue;
- if ( a.dataLabel().isNull() ){
- if ( decimalPos > 0 && value != 0 )
- roundedValue = roundValues ( value, decimalPos, decimalDigits );
- else
- roundedValue = QString::number( value );
- }else{
- roundedValue = a.dataLabel();
- }
-
- // handle prefix and suffix
- if ( !a.prefix().isNull() )
- roundedValue.prepend( a.prefix() );
-
- if ( !a.suffix().isNull() )
- roundedValue.append( a.suffix() );
-
- paintDataValueText( diag, painter, a, pos, roundedValue, value >= 0.0,
- justCalculateRect, cumulatedBoundingRect );
- }
-
-
- void paintDataValueText( const AbstractDiagram* diag,
- QPainter* painter,
- const DataValueAttributes& attrs,
- const QPointF& pos,
- QString text,
- bool valueIsPositive,
- bool justCalculateRect=false,
- QRectF* cumulatedBoundingRect=0 )
- {
- if ( !attrs.isVisible() ) return;
-
- const TextAttributes ta( attrs.textAttributes() );
- if ( ta.isVisible() ) {
- /* for debugging:
- PainterSaver painterSaver( painter );
- painter->setPen( Qt::black );
- painter->drawLine( pos - QPointF( 2,2), pos + QPointF( 2,2) );
- painter->drawLine( pos - QPointF(-2,2), pos + QPointF(-2,2) );
- */
-
- QTextDocument doc;
- if( Qt::mightBeRichText( text ) )
- doc.setHtml( text );
- else
- doc.setPlainText( text );
-
- const RelativePosition relPos( attrs.position( valueIsPositive ) );
- //const Qt::Alignment alignBottomLeft = Qt::AlignBottom | Qt::AlignLeft;
- const QFont calculatedFont( ta.calculatedFont( plane, KDChartEnums::MeasureOrientationMinimum ) );
-
- // note: We can not use boundingRect() to retrieve the width, as that returnes a too small value
- const QSizeF plainSize(
- cachedFontMetrics( calculatedFont, painter->device() )->width( doc.toPlainText() ),
- cachedFontMetrics( calculatedFont, painter->device() )->boundingRect( doc.toPlainText() ).height() );
-
- // FIXME draw the non-text bits, background, etc
-
- if ( attrs.showRepetitiveDataLabels() || pos.x() <= lastX || lastRoundedValue != text ) {
- //qDebug() << text;
-
- //Check if there is only one and only one pie.
- //If not then update lastRoundedValue for further checking.
- if(!(diag->model()->rowCount() == 1))
- lastRoundedValue = text;
-
- lastX = pos.x();
- const PainterSaver painterSaver( painter );
- painter->setPen( PrintingParameters::scalePen( ta.pen() ) );
-
- doc.setDefaultFont( calculatedFont );
- QAbstractTextDocumentLayout::PaintContext context;
- context.palette = diag->palette();
- context.palette.setColor(QPalette::Text, ta.pen().color() );
-
- BackgroundAttributes back(attrs.backgroundAttributes());
- if(back.isVisible())
- {
- QTextBlockFormat fmt;
- fmt.setBackground(back.brush());
- QTextCursor cursor(&doc);
- cursor.setPosition(0);
- cursor.movePosition(QTextCursor::End, QTextCursor::KeepAnchor, 1);
- cursor.mergeBlockFormat(fmt);
- }
-
- QAbstractTextDocumentLayout* const layout = doc.documentLayout();
-
- painter->translate( pos );
- painter->rotate( ta.rotation() );
- qreal dx = 0.0;
- qreal dy = 0.0;
- const Qt::Alignment alignTopLeft = (Qt::AlignLeft | Qt::AlignTop);
- if( (relPos.alignment() & alignTopLeft) != alignTopLeft ){
- if( relPos.alignment() & Qt::AlignRight )
- dx = - plainSize.width();
- else if( relPos.alignment() & Qt::AlignHCenter )
- dx = - 0.5 * plainSize.width();
-
- if( relPos.alignment() & Qt::AlignBottom )
- dy = - plainSize.height();
- else if( relPos.alignment() & Qt::AlignVCenter )
- dy = - 0.5 * plainSize.height();
- }
-
- bool drawIt = true;
- // note: This flag can be set differently for every label text!
- // In theory a user could e.g. have some small red text on one of the
- // values that she wants to have written in any case - so we just
- // do not test if such texts would cover some of the others.
- if( ! attrs.showOverlappingDataLabels() ){
- const QRectF br( layout->blockBoundingRect( doc.begin() ) );
- qreal radRot = DEGTORAD( - ((ta.rotation() < 0) ? ta.rotation()+360 : ta.rotation()) );
- //qDebug() << radRot;
- qreal cosRot = cos( radRot );
- qreal sinRot = sin( radRot );
- QPolygon pr( br.toRect(), true );
- // YES, people, the following stuff NEEDS to be done that way!
- // Otherwise we will not get the texts' individual rotation
- // and/or the shifting of the texts correctly.
- // Just believe me - I did tests .. :-) (khz, 2008-02-19)
- for( int i=0; i(pos.x() + x*cosRot + y*sinRot),
- static_cast(pos.y() - x*sinRot + y*cosRot));
- }
- KDAB_FOREACH( QPolygon oldPoly, alreadyDrawnDataValueTexts ) {
- if( ! oldPoly.intersected( pr ).isEmpty() )
- drawIt = false;
- }
- if( drawIt )
- alreadyDrawnDataValueTexts << pr;
- }
- if( drawIt ){
- QRectF rect = layout->frameBoundingRect(doc.rootFrame());
- rect.moveTo(pos.x()+dx, pos.y()+dy);
-
- if( justCalculateRect && cumulatedBoundingRect ){
- (*cumulatedBoundingRect) |= rect;
- }else{
- painter->translate( QPointF( dx, dy ) );
- layout->draw( painter, context );
-
- // Return the cumulatedBoundingRect if asked for
- if(cumulatedBoundingRect)
- (*cumulatedBoundingRect) |= rect;
- }
- }
- }
-
- }
- }
-
- virtual QModelIndex indexAt( const QPoint& point ) const
- {
- QModelIndexList l = indexesAt( point );
- qSort( l );
- if ( !l.isEmpty() )
- return l.first();
- else
- return QModelIndex();
- }
-
- QModelIndexList indexesAt( const QPoint& point ) const
- {
- return reverseMapper.indexesAt( point ); // which could be empty
- }
-
- QModelIndexList indexesIn( const QRect& rect ) const
- {
- return reverseMapper.indexesIn( rect );
- }
-
- virtual CartesianDiagramDataCompressor::DataValueAttributesList aggregatedAttrs(
- AbstractDiagram * diagram,
- const QModelIndex & index,
- const CartesianDiagramDataCompressor::CachePosition * position ) const
- {
- Q_UNUSED( position ); // used by cartesian diagrams only
- CartesianDiagramDataCompressor::DataValueAttributesList allAttrs;
- allAttrs[index] = diagram->dataValueAttributes( index );
- return allAttrs;
- }
-
- /**
- * Sets arbitrary attributes of a data set.
- */
- void setDatasetAttrs( int dataset, QVariant data, DisplayRoles role )
- {
- // To store attributes for a dataset, we use the first column
- // that's associated with it. (i.e., with a dataset dimension
- // of two, the column of the keys). In most cases however, there's
- // only one data dimension, and thus also only one column per data set.
- int column = dataset * datasetDimension;
- attributesModel->setHeaderData( column, Qt::Horizontal, data, role );
- }
-
- /**
- * Retrieves arbitrary attributes of a data set.
- */
- QVariant datasetAttrs( int dataset, DisplayRoles role ) const
- {
- // See setDataSetAttrs for explanation of column
- int column = dataset * datasetDimension;
- return attributesModel->headerData( column, Qt::Horizontal, role );
- }
-
- /**
- * Resets an attribute of a dataset back to its default.
- */
- void resetDatasetAttrs( int dataset, DisplayRoles role )
- {
- // See setDataSetAttrs for explanation of column
- int column = dataset * datasetDimension;
- attributesModel->resetHeaderData( column, Qt::Horizontal, role );
- }
-
- protected:
- void init();
- void init( AbstractCoordinatePlane* plane );
- QPointer plane;
- mutable QModelIndex attributesModelRootIndex;
- QPointer attributesModel;
- bool allowOverlappingDataValueTexts;
- bool antiAliasing;
- bool percent;
- int datasetDimension;
- mutable QPair databoundaries;
- mutable bool databoundariesDirty;
- ReverseMapper reverseMapper;
-
- QMap< Qt::Orientation, QString > unitSuffix;
- QMap< Qt::Orientation, QString > unitPrefix;
- QMap< int, QMap< Qt::Orientation, QString > > unitSuffixMap;
- QMap< int, QMap< Qt::Orientation, QString > > unitPrefixMap;
- QList< QPolygon > alreadyDrawnDataValueTexts;
-
- private:
- QString lastRoundedValue;
- qreal lastX;
- QFontMetrics mCachedFontMetrics;
- QFont mCachedFont;
- QPaintDevice * mCachedPaintDevice;
- };
-
- inline AbstractDiagram::AbstractDiagram( Private * p ) : _d( p )
- {
- init();
- }
- inline AbstractDiagram::AbstractDiagram(
- Private * p, QWidget* parent, AbstractCoordinatePlane* plane )
- : QAbstractItemView( parent ), _d( p )
- {
- _d->init( plane );
- init();
- }
-
-
- class LineAttributesInfo {
- public :
- LineAttributesInfo() {}
- LineAttributesInfo( const QModelIndex _index, const QPointF& _value, const QPointF& _nextValue )
- :index( _index ), value ( _value ), nextValue ( _nextValue ) {}
-
- QModelIndex index;
- QPointF value;
- QPointF nextValue;
- };
-
- typedef QVector LineAttributesInfoList;
- typedef QVectorIterator LineAttributesInfoListIterator;
-
-}
-#endif /* KDCHARTDIAGRAM_P_H */
diff --git a/lib/libkdchart/src/KDChartAbstractGrid.cpp b/lib/libkdchart/src/KDChartAbstractGrid.cpp
deleted file mode 100644
index 0b52b4e..0000000
--- a/lib/libkdchart/src/KDChartAbstractGrid.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractGrid.h"
-#include "KDChartPaintContext.h"
-
-#include
-
-#include
-
-
-using namespace KDChart;
-using namespace std;
-
-
-static qreal _trunc( qreal v )
-{
- return (( v > 0.0 ) ? floor( v ) : ceil( v ));
-}
-
-
-AbstractGrid::AbstractGrid ()
- : mPlane( 0 )
-{
- //this bloc left empty intentionally
-}
-
-AbstractGrid::~AbstractGrid()
-{
- //this bloc left empty intentionally
-}
-
-void AbstractGrid::setNeedRecalculate()
-{
- mCachedRawDataDimensions.clear();
-}
-
-DataDimensionsList AbstractGrid::updateData( AbstractCoordinatePlane* plane )
-{
-
- if( plane ){
- const DataDimensionsList rawDataDimensions( plane->getDataDimensionsList() );
- if( mCachedRawDataDimensions.empty() || (rawDataDimensions != mCachedRawDataDimensions) ){
- mCachedRawDataDimensions = rawDataDimensions;
- mPlane = plane;
- mData = calculateGrid( rawDataDimensions );
- //qDebug("AbstractGrid::updateData() returns mData.first().start: %f mData.first().end: %f mData.first().stepWidth: %f", mData.first().start, mData.first().end, mData.first().stepWidth);
- }
- }
- return mData;
-}
-
-bool AbstractGrid::isBoundariesValid(const QRectF& r )
-{
- return isBoundariesValid(
- QPair(r.topLeft(), r.bottomRight()) );
-}
-
-bool AbstractGrid::isBoundariesValid(const QPair& b )
-{
- return isValueValid( b.first.x() ) && isValueValid( b.first.y() ) &&
- isValueValid( b.second.x() ) && isValueValid( b.second.y() );
-}
-
-bool AbstractGrid::isBoundariesValid(const DataDimensionsList& l )
-{
- for (int i = 0; i < l.size(); ++i)
- if ( ! isValueValid( l.at(i).start ) || ! isValueValid( l.at(i).end ) )
- return false;
- return true;
-}
-
-bool AbstractGrid::isValueValid(const qreal& r )
-{
- return !(ISNAN(r) || ISINF(r));
-}
-
-void AbstractGrid::adjustLowerUpperRange(
- qreal& start, qreal& end,
- qreal stepWidth,
- bool adjustLower, bool adjustUpper )
-{
- const qreal startAdjust = ( start >= 0.0 ) ? 0.0 : -1.0;
- const qreal endAdjust = ( end >= 0.0 ) ? 1.0 : 0.0;
- if ( adjustLower && (fmod( start, stepWidth ) != 0.0) )
- start = stepWidth * (_trunc( start / stepWidth ) + startAdjust);
- if ( adjustUpper && (fmod( end, stepWidth ) != 0.0) )
- end = stepWidth * (_trunc( end / stepWidth ) + endAdjust);
-}
-
-const DataDimension AbstractGrid::adjustedLowerUpperRange(
- const DataDimension& dim,
- bool adjustLower, bool adjustUpper )
-{
- DataDimension result( dim );
- adjustLowerUpperRange(
- result.start, result.end,
- result.stepWidth,
- adjustLower, adjustUpper );
- return result;
-}
diff --git a/lib/libkdchart/src/KDChartAbstractGrid.h b/lib/libkdchart/src/KDChartAbstractGrid.h
deleted file mode 100644
index 5ec2685..0000000
--- a/lib/libkdchart/src/KDChartAbstractGrid.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTGRID_H
-#define KDCHARTABSTRACTGRID_H
-
-#include
-
-#include "KDChartAbstractCoordinatePlane.h"
-#include "KDChartGridAttributes.h"
-#include "KDChartAbstractDiagram.h"
-#include "KDChartCartesianAxis.h"
-
-namespace KDChart {
-
- class PaintContext;
-
-
- /**
- * \internal
- *
- * \brief Abstract base class for grid classes: cartesian, polar, ...
- *
- * The AbstractGrid interface is the base class used by
- * AbstractCoordinatePlane, for calculating and for drawing
- * the grid lines of the plane.
- */
- class AbstractGrid
- {
- public:
- virtual ~AbstractGrid();
- protected:
- AbstractGrid ();
-
-
- public:
- /** \brief Returns the cached result of data calculation.
- *
- * For this, all derived classes need to implement the
- * pure-virtual calculateGrid() method.
- */
- DataDimensionsList updateData( AbstractCoordinatePlane* plane );
-
- /**
- * Doing the actual drawing.
- *
- * Every derived class must implement this.
- *
- * \note When implementing drawGrid(): Before you start drawing,
- * make sure to call updateData(), to get the data boundaries
- * recalculated.
- * For an example, see the implementation of CartesianGrid:drawGrid().
- */
- virtual void drawGrid( PaintContext* context ) = 0;
-
- /**
- * Causes grid to be recalculated upon the next call
- * of updateData().
- *
- * \see calculateGrid
- */
- void setNeedRecalculate();
-
- /**
- * Checks whether both coordinates of r are valid according
- * to isValueValid
- *
- * \see isValueValid
- */
- static bool isBoundariesValid(const QRectF& r );
-
- /**
- * Checks whether both coordinates of both points are valid
- * according to isValueValid
- *
- * \see isValueValid
- */
- static bool isBoundariesValid(const QPair& b );
-
- /**
- * Checks whether all start and end properties of every
- * DataDimension in the list l are valid according to
- * isValueValid().
- *
- * \see isValueValid
- */
- static bool isBoundariesValid(const DataDimensionsList& l );
-
- /**
- * Checks if r is neither NaN nor infinity.
- */
- static bool isValueValid(const qreal& r );
-
- /**
- * Adjusts \a start and/or \a end so that they are a multiple of
- * \a stepWidth
- */
- static void adjustLowerUpperRange(
- qreal& start, qreal& end,
- qreal stepWidth,
- bool adjustLower, bool adjustUpper );
-
- /**
- * Adjusts \a dim so that \c dim.start and/or \c dim.end are a multiple
- * of \c dim.stepWidth.
- *
- * \see adjustLowerUpperRange
- */
- static const DataDimension adjustedLowerUpperRange(
- const DataDimension& dim,
- bool adjustLower, bool adjustUpper );
-
- GridAttributes gridAttributes;
-
- protected:
- DataDimensionsList mData;
- AbstractCoordinatePlane* mPlane;
-
- private:
- /**
- * \brief Calculates the grid start/end/step width values.
- *
- * Gets the raw data dimensions - e.g. the data model's boundaries,
- * together with their isCalculated flags.
- *
- * Returns the calculated start/end values for the grid, and their
- * respective step widths.
- * If at least one of the step widths is Zero, all dimensions of
- * the returned list are considered invalid!
- *
- * \note This function needs to be implemented by all derived classes,
- * like CartesianGrid, PolarGrid, ...
- */
- virtual DataDimensionsList calculateGrid( const DataDimensionsList& rawDataDimensions ) const = 0;
- DataDimensionsList mCachedRawDataDimensions;
- };
-
-}
-
-#endif
diff --git a/lib/libkdchart/src/KDChartAbstractPieDiagram.cpp b/lib/libkdchart/src/KDChartAbstractPieDiagram.cpp
deleted file mode 100644
index 434eef2..0000000
--- a/lib/libkdchart/src/KDChartAbstractPieDiagram.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractPieDiagram.h"
-#include "KDChartAbstractPieDiagram_p.h"
-
-#include "KDChartAttributesModel.h"
-#include "KDChartPieAttributes.h"
-#include "KDChartThreeDPieAttributes.h"
-
-#include
-
-#include
-
-
-using namespace KDChart;
-
-AbstractPieDiagram::Private::Private() :
- granularity( 1.0 )
-{
-}
-
-AbstractPieDiagram::Private::~Private() {}
-
-AbstractPieDiagram::AbstractPieDiagram( QWidget* parent, PolarCoordinatePlane *plane ) :
- AbstractPolarDiagram( new Private(), parent, plane )
-{
- init();
-}
-
-AbstractPieDiagram::~AbstractPieDiagram()
-{
-}
-
-
-void AbstractPieDiagram::init()
-{
-}
-
-
-bool AbstractPieDiagram::compare( const AbstractPieDiagram* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "AbstractPieDiagram::compare() cannot compare to Null pointer";
- return false;
- }
- /*
- qDebug() << "\n AbstractPieDiagram::compare():";
- // compare own properties
- qDebug() <<
- (granularity() == other->granularity()) &&
- (startPosition() == other->startPosition());
- */
- return // compare the base class
- ( static_cast(this)->compare( other ) ) &&
- // compare own properties
- (granularity() == other->granularity()) &&
- (startPosition() == other->startPosition());
-}
-
-
-#define d d_func()
-
-void AbstractPieDiagram::setGranularity( qreal value )
-{
- d->granularity = value;
-}
-
-qreal AbstractPieDiagram::granularity() const
-{
- return (d->granularity < 0.05 || d->granularity > 36.0)
- ? 1.0
- : d->granularity;
-}
-
-
-void AbstractPieDiagram::setStartPosition( int degrees )
-{
- Q_UNUSED( degrees );
- qWarning() << "Deprecated AbstractPieDiagram::setStartPosition() called, setting ignored.";
-}
-
-int AbstractPieDiagram::startPosition() const
-{
- qWarning() << "Deprecated AbstractPieDiagram::startPosition() called.";
- return 0;
-}
-
-void AbstractPieDiagram::setPieAttributes( const PieAttributes & attrs )
-{
- d->attributesModel->setModelData( qVariantFromValue( attrs ), PieAttributesRole );
- emit layoutChanged( this );
-}
-
-void AbstractPieDiagram::setPieAttributes( int column, const PieAttributes & attrs )
-{
- d->setDatasetAttrs( column, qVariantFromValue( attrs ), PieAttributesRole );
- emit layoutChanged( this );
-}
-
-void AbstractPieDiagram::setPieAttributes( const QModelIndex & index, const PieAttributes & attrs )
-{
- d->attributesModel->setData( index, qVariantFromValue( attrs), PieAttributesRole );
- emit layoutChanged( this );
-}
-
-// Note: Our users NEED this method - even if
-// we do not need it at drawing time!
-// (khz, 2006-07-28)
-PieAttributes AbstractPieDiagram::pieAttributes() const
-{
- return qVariantValue(
- d->attributesModel->data( PieAttributesRole ) );
-}
-
-// Note: Our users NEED this method - even if
-// we do not need it at drawing time!
-// (khz, 2006-07-28)
-PieAttributes AbstractPieDiagram::pieAttributes( int column ) const
-{
- const QVariant attrs( d->datasetAttrs( column, PieAttributesRole ) );
- if( attrs.isValid() )
- return qVariantValue< PieAttributes >( attrs );
- return pieAttributes();
-}
-
-PieAttributes AbstractPieDiagram::pieAttributes( const QModelIndex & index ) const
-{
- return qVariantValue(
- d->attributesModel->data(
- d->attributesModel->mapFromSource( index ),
- PieAttributesRole ) );
-}
-
-
-void AbstractPieDiagram::setThreeDPieAttributes( const ThreeDPieAttributes & tda )
-{
- d->attributesModel->setModelData( qVariantFromValue( tda ), ThreeDPieAttributesRole );
- emit layoutChanged( this );
-}
-
-void AbstractPieDiagram::setThreeDPieAttributes( int column, const ThreeDPieAttributes & tda )
-{
- d->setDatasetAttrs( column, qVariantFromValue( tda ), ThreeDPieAttributesRole );
- emit layoutChanged( this );
-}
-
-void AbstractPieDiagram::setThreeDPieAttributes( const QModelIndex & index, const ThreeDPieAttributes & tda )
-{
- model()->setData( index, qVariantFromValue( tda ), ThreeDPieAttributesRole );
- emit layoutChanged( this );
-}
-
-// Note: Our users NEED this method - even if
-// we do not need it at drawing time!
-// (khz, 2006-07-28)
-ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes() const
-{
- return qVariantValue(
- d->attributesModel->data( ThreeDPieAttributesRole ) );
-}
-
-// Note: Our users NEED this method - even if
-// we do not need it at drawing time!
-// (khz, 2006-07-28)
-ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes( int column ) const
-{
- const QVariant attrs( d->datasetAttrs( column, ThreeDPieAttributesRole ) );
- if( attrs.isValid() )
- return qVariantValue< ThreeDPieAttributes >( attrs );
- return threeDPieAttributes();
-}
-
-ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes( const QModelIndex & index ) const
-{
- return qVariantValue(
- d->attributesModel->data(
- d->attributesModel->mapFromSource( index ),
- ThreeDPieAttributesRole ) );
-}
-
diff --git a/lib/libkdchart/src/KDChartAbstractPieDiagram.h b/lib/libkdchart/src/KDChartAbstractPieDiagram.h
deleted file mode 100644
index d380d7c..0000000
--- a/lib/libkdchart/src/KDChartAbstractPieDiagram.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTPIEDIAGRAM_H
-#define KDCHARTABSTRACTPIEDIAGRAM_H
-
-#include "KDChartAbstractPolarDiagram.h"
-
-namespace KDChart {
- class PieAttributes;
- class ThreeDPieAttributes;
-
-/**
- * @brief Base class for any diagram type
- */
-class KDCHART_EXPORT AbstractPieDiagram : public AbstractPolarDiagram
-{
- Q_OBJECT
-
- Q_DISABLE_COPY( AbstractPieDiagram )
- KDCHART_DECLARE_DERIVED_DIAGRAM( AbstractPieDiagram, PolarCoordinatePlane )
-
-public:
- explicit AbstractPieDiagram(
- QWidget* parent = 0, PolarCoordinatePlane* plane = 0 );
- virtual ~AbstractPieDiagram();
-
- /**
- * Returns true if both diagrams have the same settings.
- */
- bool compare( const AbstractPieDiagram* other )const;
-
- /** Set the granularity: the smaller the granularity the more your diagram
- * segments will show facettes instead of rounded segments.
- * \param value the granularity value between 0.05 (one twentieth of a degree)
- * and 36.0 (one tenth of a full circle), other values will be interpreted as 1.0.
- */
- void setGranularity( qreal value );
-
- /** @return the granularity. */
- qreal granularity() const;
-
- /** \deprecated Use PolarCoordinatePlane::setStartPosition( qreal degrees ) instead. */
- void setStartPosition( int degrees );
- /** \deprecated Use qreal PolarCoordinatePlane::startPosition instead. */
- int startPosition() const;
-
- void setPieAttributes( const PieAttributes & a );
- void setPieAttributes( int column,
- const PieAttributes & a );
- void setPieAttributes( const QModelIndex & index,
- const PieAttributes & a );
- PieAttributes pieAttributes() const;
- PieAttributes pieAttributes( int column ) const;
- PieAttributes pieAttributes( const QModelIndex & index ) const;
-
- void setThreeDPieAttributes( const ThreeDPieAttributes & a );
- void setThreeDPieAttributes( int column,
- const ThreeDPieAttributes & a );
- void setThreeDPieAttributes( const QModelIndex & index,
- const ThreeDPieAttributes & a );
- ThreeDPieAttributes threeDPieAttributes() const;
- ThreeDPieAttributes threeDPieAttributes( int column ) const;
- ThreeDPieAttributes threeDPieAttributes( const QModelIndex & index ) const;
-}; // End of class KDChartAbstractPieDiagram
-
-}
-
-#endif // KDCHARTABSTACTPIEDIAGRAM_H
diff --git a/lib/libkdchart/src/KDChartAbstractPieDiagram_p.h b/lib/libkdchart/src/KDChartAbstractPieDiagram_p.h
deleted file mode 100644
index 05adf93..0000000
--- a/lib/libkdchart/src/KDChartAbstractPieDiagram_p.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTPIEDIAGRAM_P_H
-#define KDCHARTABSTRACTPIEDIAGRAM_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "KDChartAbstractPolarDiagram_p.h"
-#include
-
-#include
-
-
-namespace KDChart {
-
-class PolarCoordinatePlane;
-
-/**
- * \internal
- */
-class AbstractPieDiagram::Private : public AbstractPolarDiagram::Private
-{
- friend class AbstractPieDiagram;
-public:
- Private();
- ~Private();
-
- Private( const Private& rhs ) :
- AbstractPolarDiagram::Private( rhs ),
- granularity( rhs.granularity )
- {
- }
-
-private:
- double granularity;
-};
-
-KDCHART_IMPL_DERIVED_DIAGRAM( AbstractPieDiagram, AbstractPolarDiagram, PolarCoordinatePlane )
-
-}
-#endif /* KDCHARTABSTRACTPIEDIAGRAM_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractPolarDiagram.cpp b/lib/libkdchart/src/KDChartAbstractPolarDiagram.cpp
deleted file mode 100644
index 0e30e50..0000000
--- a/lib/libkdchart/src/KDChartAbstractPolarDiagram.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractPolarDiagram.h"
-#include "KDChartAbstractPolarDiagram_p.h"
-
-#include
-
-
-using namespace KDChart;
-
-AbstractPolarDiagram::Private::Private()
-{
-}
-
-AbstractPolarDiagram::Private::~Private()
-{
-}
-
-void AbstractPolarDiagram::init()
-{
-}
-
-#define d d_func()
-
-AbstractPolarDiagram::AbstractPolarDiagram (
- QWidget* parent, PolarCoordinatePlane* plane )
- : AbstractDiagram ( new Private(), parent, plane )
-{
-}
-
-
-const PolarCoordinatePlane * AbstractPolarDiagram::polarCoordinatePlane() const
-{
- return dynamic_cast( coordinatePlane() );
-}
-
-int AbstractPolarDiagram::columnCount() const
-{
- return static_cast( numberOfValuesPerDataset() );
-}
-
-int AbstractPolarDiagram::rowCount() const
-{
- return static_cast( numberOfDatasets() );
-}
diff --git a/lib/libkdchart/src/KDChartAbstractPolarDiagram.h b/lib/libkdchart/src/KDChartAbstractPolarDiagram.h
deleted file mode 100644
index 3ecb12d..0000000
--- a/lib/libkdchart/src/KDChartAbstractPolarDiagram.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTPOLARDIAGRAM_H
-#define KDCHARTABSTRACTPOLARDIAGRAM_H
-
-#include "KDChartPolarCoordinatePlane.h"
-#include "KDChartAbstractDiagram.h"
-
-namespace KDChart {
-
- class GridAttributes;
-
- /**
- * @brief Base class for diagrams based on a polar coordinate system.
- */
- class KDCHART_EXPORT AbstractPolarDiagram : public AbstractDiagram
- {
- Q_OBJECT
- Q_DISABLE_COPY( AbstractPolarDiagram )
- KDCHART_DECLARE_DERIVED_DIAGRAM( AbstractPolarDiagram, PolarCoordinatePlane )
-
- public:
- explicit AbstractPolarDiagram (
- QWidget* parent = 0, PolarCoordinatePlane* plane = 0 );
- virtual ~AbstractPolarDiagram() {}
-
- virtual double valueTotals () const = 0;
- virtual double numberOfValuesPerDataset() const = 0;
- virtual double numberOfDatasets() const { return 1; };
- virtual double numberOfGridRings() const = 0;
-
- const PolarCoordinatePlane * polarCoordinatePlane() const;
-
- int columnCount() const;
- int rowCount() const;
- };
-
-}
-
-#endif
diff --git a/lib/libkdchart/src/KDChartAbstractPolarDiagram_p.h b/lib/libkdchart/src/KDChartAbstractPolarDiagram_p.h
deleted file mode 100644
index 2484141..0000000
--- a/lib/libkdchart/src/KDChartAbstractPolarDiagram_p.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTPOLARDIAGRAM_P_H
-#define KDCHARTABSTRACTPOLARDIAGRAM_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "KDChartAbstractDiagram_p.h"
-#include
-
-#include
-
-
-namespace KDChart {
-
- class PolarCoordinatePlane;
-
-/**
- * \internal
- */
-class AbstractPolarDiagram::Private : public AbstractDiagram::Private
-{
- friend class AbstractPolarDiagram;
-public:
- Private();
- ~Private();
-
- Private( const Private& rhs ) :
- AbstractDiagram::Private( rhs )
- {
- // just for consistency
- }
-
- /** \reimpl */
- // FIXME: Optimize when needed
- virtual qreal calcPercentValue( const QModelIndex & index )
- {
- qreal sum = 0.0;
- for ( int row = 0; row < attributesModel->rowCount( QModelIndex() ); row++ )
- sum += attributesModel->data( attributesModel->index( row, index.column(), QModelIndex() ) ).toDouble();
- if ( sum == 0.0 )
- return 0.0;
- return attributesModel->data( attributesModel->mapFromSource( index ) ).toDouble() / sum * 100.0;
- }
-
-private:
- double granularity;
-};
-
-KDCHART_IMPL_DERIVED_DIAGRAM( AbstractPolarDiagram, AbstractDiagram, PolarCoordinatePlane )
-/*
-inline AbstractPolarDiagram::AbstractPolarDiagram( Private * p )
- : AbstractDiagram( p ) { init(); }
-inline AbstractPolarDiagram::AbstractPolarDiagram(
- Private *p, QWidget* parent, PolarCoordinatePlane* plane )
- : AbstractDiagram( p, parent, plane ) { init(); }
-inline AbstractPolarDiagram::Private * AbstractPolarDiagram::d_func()
-{ return static_cast( AbstractDiagram::d_func() ); }
-inline const AbstractPolarDiagram::Private * AbstractPolarDiagram::d_func() const
-{ return static_cast( AbstractDiagram::d_func() ); }
-*/
-
-}
-#endif /* KDCHARTABSTRACTCARTESIANDIAGRAM_P_H */
-
diff --git a/lib/libkdchart/src/KDChartAbstractProxyModel.cpp b/lib/libkdchart/src/KDChartAbstractProxyModel.cpp
deleted file mode 100644
index 6f9594b..0000000
--- a/lib/libkdchart/src/KDChartAbstractProxyModel.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractProxyModel.h"
-
-#include
-
-#include
-
-
-namespace KDChart {
-
- /** This is basically KDAbstractProxyModel, but only the
- bits that we really need from it */
-AbstractProxyModel::AbstractProxyModel(QObject* parent)
- : QAbstractProxyModel(parent) {}
-
-// Think this is ugly? Well, it's not from me, it comes from QProxyModel
-struct KDPrivateModelIndex
-{
- int r, c;
- void *p;
- const QAbstractItemModel *m;
-};
-
-QModelIndex AbstractProxyModel::mapFromSource( const QModelIndex & sourceIndex ) const
-{
- if ( !sourceIndex.isValid() )
- return QModelIndex();
- //qDebug() << "sourceIndex.model()="<index... so we have to do the ugly way:
- QModelIndex sourceIndex;
- KDPrivateModelIndex* hack = reinterpret_cast(&sourceIndex);
- hack->r = proxyIndex.row();
- hack->c = proxyIndex.column();
- hack->p = proxyIndex.internalPointer();
- hack->m = sourceModel();
- Q_ASSERT( sourceIndex.isValid() );
- return sourceIndex;
-}
-
-QModelIndex AbstractProxyModel::index( int row, int col, const QModelIndex& index ) const
-{
- Q_ASSERT(sourceModel());
- return mapFromSource(sourceModel()->index( row, col, mapToSource(index) ));
-}
-
-QModelIndex AbstractProxyModel::parent( const QModelIndex& index ) const
-{
- Q_ASSERT(sourceModel());
- return mapFromSource(sourceModel()->parent( mapToSource(index) ));
-}
-
-}
diff --git a/lib/libkdchart/src/KDChartAbstractProxyModel.h b/lib/libkdchart/src/KDChartAbstractProxyModel.h
deleted file mode 100644
index dcc7c8b..0000000
--- a/lib/libkdchart/src/KDChartAbstractProxyModel.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTPROXYMODEL_H
-#define KDCHARTABSTRACTPROXYMODEL_H
-
-#include
-
-#include "KDChartGlobal.h"
-
-namespace KDChart
-{
- /**
- * @brief Base class for all proxy models used inside KD Chart
- * \internal
- */
- class KDCHART_EXPORT AbstractProxyModel : public QAbstractProxyModel
- {
- Q_OBJECT
- public:
- explicit AbstractProxyModel( QObject* parent = 0 );
-
- /*! \reimpl */
- QModelIndex mapFromSource( const QModelIndex & sourceIndex ) const;
- /*! \reimpl */
- QModelIndex mapToSource( const QModelIndex &proxyIndex ) const;
-
- /*! \reimpl */
- QModelIndex index( int row, int col, const QModelIndex& index ) const;
- /*! \reimpl */
- QModelIndex parent( const QModelIndex& index ) const;
- };
-}
-
-#endif /* KDCHARTABSTRACTPROXYMODEL_H */
diff --git a/lib/libkdchart/src/KDChartAbstractThreeDAttributes.cpp b/lib/libkdchart/src/KDChartAbstractThreeDAttributes.cpp
deleted file mode 100644
index 83ca0f3..0000000
--- a/lib/libkdchart/src/KDChartAbstractThreeDAttributes.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAbstractThreeDAttributes.h"
-#include "KDChartAbstractThreeDAttributes_p.h"
-
-#include
-
-#include
-
-#define d d_func()
-
-
-using namespace KDChart;
-
-
-AbstractThreeDAttributes::Private::Private()
- : enabled( false ),
- depth( 20 )
-{
-}
-
-
-AbstractThreeDAttributes::AbstractThreeDAttributes()
- : _d( new Private() )
-{
-}
-
-AbstractThreeDAttributes::AbstractThreeDAttributes( const AbstractThreeDAttributes& r )
- : _d( new Private( *r.d ) )
-{
-}
-
-AbstractThreeDAttributes& AbstractThreeDAttributes::operator= ( const AbstractThreeDAttributes& r )
-{
- if( this == &r )
- return *this;
-
- *d = *r.d;
-
- return *this;
-}
-
-AbstractThreeDAttributes::~AbstractThreeDAttributes()
-{
- delete _d; _d = 0;
-}
-
-
-bool AbstractThreeDAttributes::operator==( const AbstractThreeDAttributes& r ) const
-{
- if( isEnabled() == r.isEnabled() &&
- depth() == r.depth() )
- return true;
- else
- return false;
-}
-
-
-void AbstractThreeDAttributes::init( )
-{
-
-}
-
-void AbstractThreeDAttributes::setEnabled( bool enabled )
-{
- d->enabled = enabled;
-}
-
-bool AbstractThreeDAttributes::isEnabled() const
-{
- return d->enabled;
-}
-
-void AbstractThreeDAttributes::setDepth( double depth )
-{
- d->depth = depth;
-}
-
-
-double AbstractThreeDAttributes::depth() const
-{
- return d->depth;
-}
-
-
-double AbstractThreeDAttributes::validDepth() const
-{
- return isEnabled() ? d->depth : 0.0;
-}
-
-
-#if !defined(QT_NO_DEBUG_STREAM)
-QDebug operator<<(QDebug dbg, const KDChart::AbstractThreeDAttributes& a)
-{
- dbg << "enabled="<
-#include "KDChartGlobal.h"
-
-namespace KDChart {
-
-/**
- * @brief Base class for 3D attributes
- */
-class KDCHART_EXPORT AbstractThreeDAttributes
-{
-public:
- AbstractThreeDAttributes();
- AbstractThreeDAttributes( const AbstractThreeDAttributes& );
- AbstractThreeDAttributes &operator= ( const AbstractThreeDAttributes& );
-
- virtual ~AbstractThreeDAttributes() = 0;
-
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
- void setDepth( double depth );
- double depth() const;
-
- // returns the depth(), if is isEnabled() is true, otherwise returns 0.0
- double validDepth() const;
-
- bool operator==( const AbstractThreeDAttributes& ) const;
- inline bool operator!=( const AbstractThreeDAttributes& other ) const { return !operator==(other); }
-
- KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(AbstractThreeDAttributes)
-
- KDCHART_DECLARE_SWAP_BASE(AbstractThreeDAttributes)
-
-}; // End of class AbstractThreeDAttributes
-
-}
-
-#if !defined(QT_NO_DEBUG_STREAM)
-KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::AbstractThreeDAttributes& );
-#endif /* QT_NO_DEBUG_STREAM */
-
-
-
-#endif // KDCHARTABSTRACTTHREEDATTRIBUTES_H
diff --git a/lib/libkdchart/src/KDChartAbstractThreeDAttributes_p.h b/lib/libkdchart/src/KDChartAbstractThreeDAttributes_p.h
deleted file mode 100644
index 5c88831..0000000
--- a/lib/libkdchart/src/KDChartAbstractThreeDAttributes_p.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef KDCHARTABSTRACTTHREEDATTRIBUTES_P_H
-#define KDCHARTABSTRACTTHREEDATTRIBUTES_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the KD Chart API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include
-
-#include
-
-
-namespace KDChart {
-
-/**
- * \internal
- */
-class AbstractThreeDAttributes::Private
-{
- friend class AbstractThreeDAttributes;
-public:
- Private();
-
-private:
- bool enabled;
- int height;
- double depth;
-};
-
-inline AbstractThreeDAttributes::AbstractThreeDAttributes( Private * p ) : _d( p ) { init(); }
-
-}
-
-#endif // KDCHARTABSTRACTTHREEDATTRIBUTES_P_H
diff --git a/lib/libkdchart/src/KDChartAttributesModel.cpp b/lib/libkdchart/src/KDChartAttributesModel.cpp
deleted file mode 100644
index eea74b9..0000000
--- a/lib/libkdchart/src/KDChartAttributesModel.cpp
+++ /dev/null
@@ -1,723 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Chart library.
-**
-** Licensees holding valid commercial KD Chart licenses may use this file in
-** accordance with the KD Chart Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.com if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "KDChartAttributesModel.h"
-#include "KDChartPalette.h"
-#include "KDChartGlobal.h"
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-
-using namespace KDChart;
-
-AttributesModel::AttributesModel( QAbstractItemModel* model, QObject * parent/* = 0 */ )
- : AbstractProxyModel( parent ),
- mPaletteType( PaletteTypeDefault )
-{
- setSourceModel(model);
- setDefaultForRole( KDChart::DataValueLabelAttributesRole,
- DataValueAttributes::defaultAttributesAsVariant() );
-}
-
-AttributesModel::~AttributesModel()
-{
-}
-
-void AttributesModel::initFrom( const AttributesModel* other )
-{
- if( other == this || ! other ) return;
-
- mDataMap = other->mDataMap;
- mHorizontalHeaderDataMap = other->mHorizontalHeaderDataMap;
- mVerticalHeaderDataMap = other->mVerticalHeaderDataMap;
- mModelDataMap = other->mModelDataMap;
- mDefaultsMap = other->mDefaultsMap;
-
- setPaletteType( other->paletteType() );
-}
-
-bool AttributesModel::compare( const AttributesModel* other )const
-{
- if( other == this ) return true;
- if( ! other ){
- //qDebug() << "AttributesModel::compare() cannot compare to Null pointer";
- return false;
- }
-
- {
- if (mDataMap.count() != other->mDataMap.count()){
- //qDebug() << "AttributesModel::compare() dataMap have different sizes";
- return false;
- }
- QMap > >::const_iterator itA = mDataMap.constBegin();
- QMap > >::const_iterator itB = other->mDataMap.constBegin();
- while (itA != mDataMap.constEnd()) {
- if ((*itA).count() != (*itB).count()){
- //qDebug() << "AttributesModel::compare() dataMap/map have different sizes";
- return false;
- }
- QMap >::const_iterator it2A = (*itA).constBegin();
- QMap >::const_iterator it2B = (*itB).constBegin();
- while (it2A != itA->constEnd()) {
- if ((*it2A).count() != (*it2B).count()){
- //qDebug() << "AttributesModel::compare() dataMap/map/map have different sizes:"
- // << (*it2A).count() << (*it2B).count();
- return false;
- }
- QMap::const_iterator it3A = (*it2A).constBegin();
- QMap::const_iterator it3B = (*it2B).constBegin();
- while (it3A != it2A->constEnd()) {
- if ( it3A.key() != it3B.key() ){
- //qDebug( "AttributesModel::compare()\n"
- // " dataMap[%i, %i] values have different types. A: %x B: %x",
- // itA.key(), it2A.key(), it3A.key(), it3B.key());
- return false;
- }
- if ( ! compareAttributes( it3A.key(), it3A.value(), it3B.value() ) ){
- //qDebug( "AttributesModel::compare()\n"
- // " dataMap[%i, %i] values are different. Role: %x", itA.key(), it2A.key(), it3A.key());
- return false;
- }
- ++it3A;
- ++it3B;
- }
- ++it2A;
- ++it2B;
- }
- ++itA;
- ++itB;
- }
- }
- {
- if (mHorizontalHeaderDataMap.count() != other->mHorizontalHeaderDataMap.count()){
- //qDebug() << "AttributesModel::compare() horizontalHeaderDataMap have different sizes";
- return false;
- }
- QMap >::const_iterator itA = mHorizontalHeaderDataMap.constBegin();
- QMap >::const_iterator itB = other->mHorizontalHeaderDataMap.constBegin();
- while (itA != mHorizontalHeaderDataMap.constEnd()) {
- if ((*itA).count() != (*itB).count()){
- //qDebug() << "AttributesModel::compare() horizontalHeaderDataMap/map have different sizes";
- return false;
- }
- QMap::const_iterator it2A = (*itA).constBegin();
- QMap::const_iterator it2B = (*itB).constBegin();
- while (it2A != itA->constEnd()) {
- if ( it2A.key() != it2B.key() ){
- //qDebug( "AttributesModel::compare()\n"
- // " horizontalHeaderDataMap[ %i ] values have different types. A: %x B: %x",
- // itA.key(), it2A.key(), it2B.key());
- return false;
- }
- if ( ! compareAttributes( it2A.key(), it2A.value(), it2B.value() ) ){
- //qDebug( "AttributesModel::compare()\n"
- // " horizontalHeaderDataMap[ %i ] values are different. Role: %x", itA.key(), it2A.key() );
- return false;
- }
- ++it2A;
- ++it2B;
- }
- ++itA;
- ++itB;
- }
- }
- {
- if (mVerticalHeaderDataMap.count() != other->mVerticalHeaderDataMap.count()){
- //qDebug() << "AttributesModel::compare() verticalHeaderDataMap have different sizes";
- return false;
- }
- QMap >::const_iterator itA = mVerticalHeaderDataMap.constBegin();
- QMap >::const_iterator itB = other->mVerticalHeaderDataMap.constBegin();
- while (itA != mVerticalHeaderDataMap.constEnd()) {
- if ((*itA).count() != (*itB).count()){
- //qDebug() << "AttributesModel::compare() verticalHeaderDataMap/map have different sizes";
- return false;
- }
- QMap::const_iterator it2A = (*itA).constBegin();
- QMap::const_iterator it2B = (*itB).constBegin();
- while (it2A != itA->constEnd()) {
- if ( it2A.key() != it2B.key() ){
- //qDebug( "AttributesModel::compare()\n"
- // " verticalHeaderDataMap[ %i ] values have different types. A: %x B: %x",
- // itA.key(), it2A.key(), it2B.key());
- return false;
- }
- if ( ! compareAttributes( it2A.key(), it2A.value(), it2B.value() ) ){
- //qDebug( "AttributesModel::compare()\n"
- // " verticalHeaderDataMap[ %i ] values are different. Role: %x", itA.key(), it2A.key() );
- return false;
- }
- ++it2A;
- ++it2B;
- }
- ++itA;
- ++itB;
- }
- }
- {
- if (mModelDataMap.count() != other->mModelDataMap.count()){
- //qDebug() << "AttributesModel::compare() modelDataMap have different sizes:" << mModelDataMap.count() << other->mModelDataMap.count();
- return false;
- }
- QMap::const_iterator itA = mModelDataMap.constBegin();
- QMap::const_iterator itB = other->mModelDataMap.constBegin();
- while (itA != mModelDataMap.constEnd()) {
- if ( itA.key() != itB.key() ){
- //qDebug( "AttributesModel::compare()\n"
- // " modelDataMap values have different types. A: %x B: %x",
- // itA.key(), itB.key());
- return false;
- }
- if ( ! compareAttributes( itA.key(), itA.value(), itB.value() ) ){
- //qDebug( "AttributesModel::compare()\n"
- // " modelDataMap values are different. Role: %x", itA.key() );
- return false;
- }
- ++itA;
- ++itB;
- }
- }
- if (paletteType() != other->paletteType()){
- //qDebug() << "AttributesModel::compare() palette types are different";
- return false;
- }
- return true;
-}
-
-bool AttributesModel::compareAttributes(
- int role, const QVariant& a, const QVariant& b )const
-{
- if( isKnownAttributesRole( role ) ){
- switch( role ) {
- case DataValueLabelAttributesRole:
- return (qVariantValue( a ) ==
- qVariantValue( b ));
- case DatasetBrushRole:
- return (qVariantValue( a ) ==
- qVariantValue( b ));
- case DatasetPenRole:
- return (qVariantValue( a ) ==
- qVariantValue( b ));
- case ThreeDAttributesRole:
- // As of yet there is no ThreeDAttributes class,
- // and the AbstractThreeDAttributes class is pure virtual,
- // so we ignore this role for now.
- // (khz, 04.04.2007)
- /*
- return (qVariantValue( a ) ==
- qVariantValue( b ));
- */
- break;
- case LineAttributesRole:
- return (qVariantValue( a ) ==
- qVariantValue( b ));
- case ThreeDLineAttributesRole:
- return (qVariantValue