Merge with dev

This commit is contained in:
Grégory Soutadé 2012-06-10 18:05:47 +02:00
commit 8ded65b237
426 changed files with 54971 additions and 8451 deletions

View File

@ -1,4 +1,33 @@
v0.2 (24/07/2011)
v0.3 (31/05/2012)
** User **
New interface in Qt4
Use BDD file from .local/share/kisscount
Use libkchart for graphics
Use oxygen icons
New account attribute : hidden
Description is now auto-completed
Snapshot feature
Display date in locale format
Better auto completion for transfert operation (not two times the same operation completed)
Add Win32 support (OFX import disabled)
** Dev **
Version 3 of database : account hidden item added, some id deleted, on delete constraints added
This version is not compatible with previous ones
Values are in fix point (no double anymore)
** Bugs **
Fix a bug in language settings
Virtual transferts must not be considered as a debit
Last account/category wasn't taken in account during search
New users have system language set instead of English
Account/Category modification are immediatly reported in other panels
Accounts and categories where badly mapped during import
Fix cost not taken in account during import
v0.2 (04/07/2011)
Remove dependancies of libsqlite and libxml
User throws exception if account/category not found
** User **
Better use of sizers (so better interface!)

25
INSTALL
View File

@ -1,30 +1,21 @@
** Dependencies for compilation (on Debian) **
libsqlite3-dev
libwxgtk2.8-dev
libqt4-dev (>= 4.7)
libqt4-sql-sqlite (>= 4.7)
libofx4
g++
make
gettext
Optionnal :
Optional :
git
poeditor
xgettext
qt4-dev-tools
debhelper, devscripts, dh-make, fakeroot
php5
** Compilation of extra libraries **
lib is not included by default and must be downloaded http://indefero.soutade.fr/p/kisscount/downloads/
It must be decompressed beside "src" directory.
cd lib/wxsqlite3-1.9.9
./configure
make
cd -
cd lib/freechart
make # wxFreechart is already configured
cd -
** Compilation of KissCount **
make clean
make

View File

@ -1,51 +1,84 @@
ROOT_DIR="/usr/local"
ROOT_DIR="/usr"
LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/"
SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/"
DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/"
BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/"
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
CXXFLAGS+=-I./lib/freechart/include
CXXFLAGS+=-I/usr/include/libxml2
CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)"
QT_PACKAGES="QtCore QtGui QtSql QtXml"
CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)`
CXXFLAGS+=-Wall -Isrc -Isrc/win32 -ggdb -fPIC
ifdef WIN32
CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
else
CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\""
# For developpers
#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
endif
LDFLAGS+=`wx-config --libs`
LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)`
ifndef WIN32
LDFLAGS+=-lofx
LDFLAGS+=-lxml2
ifdef WIN32
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_msw_wxsqlite3-2.8
LDFLAGS+=-L./lib/freechart/lib -lwxcode_msw_freechart-2.8
else
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
endif
CXX=$(HOST)g++
SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ')
HEADERS=$(shell find src -name '*.h' -type f)
OBJS=$(SOURCES:.cpp=.o)
MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ')
MOCS=$(MOC_HEADERS:.hpp=.objs)
MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc)
all: check kc
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
clean:
find src -type f -name '*.[o~]' -exec rm -f \{\} \;
all: mojito lib/libkdchart.a kc
clean_all: clean clean_libkdchart
clean:
find src -type f -name '*.o' -delete
find src -type f -name '*~' -delete
find src -type f -name '*.moc' -delete
find src -type f -name '*.objs' -delete
rm -f kc
%.o : src/model/%.cpp src/model/import/%.cpp src/model/export/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp
$(CXX) $(CXXFLAGS) -c $<
%.o : %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
check:
if ! test -d lib ; then echo lib directory not found, please see INSTALL ; return 1 ; fi
%.objs : %.moc
$(CXX) $(CXXFLAGS) -x c++ $< -c -o $@
kc: $(OBJS)
%.moc : %.hpp
moc -nw $< -o $@
%.moc : %.h
moc -nw $< -o $@
mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS)
kc: $(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)
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
find lib/libkdchart -name '*.o' -delete
find lib/libkdchart -type f -name '*.moc' -delete
find lib/libkdchart -type f -name '*.objs' -delete
generate_locales:
./tools/generate_locales.sh
@ -58,11 +91,14 @@ package:
endif
install:
mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
cp kc $(BIN_DIR)
find lib -name '*.so*' -exec cp -rf \{\} $(LIB_DIR) \;
cp -rf ressources/* $(SHARE_DIR)
cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR)
rm -rf $(SHARE_DIR)/ressources/po/*
cp -rf ressources/po/*.qm $(SHARE_DIR)/ressources/po/
cp -rf README* ChangeLog AUTHORS COPYING TODO $(DOC_DIR)
remove:
rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc
uninstall: remove

6
README
View File

@ -1,10 +1,8 @@
KissCount is personnal account software delivered under GPL v3 licence terms.
Current version is 0.2
Current version is 0.3
wxWidgets 2.8, sqlite3, libofx and libxml2 are needed
A modified version of wxFreeChart is used : warning during recompilation, don't overwrite autotools files with ./configure
Qt4 (>= 4.7), libqt4-sql-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.

View File

@ -1,10 +1,8 @@
KissCount est un logiciel de gestion de comptes personnels délivré sous licence GPL v3
La version actuelle est 0.2
La version actuelle est 0.3
wxWidgets 2.8, sqlite3, libofx et libxml2 sont nécessaires
Une version modifiée de wxFreeChart est utilisée : attention à lors de la recompilation à ne pas écraser les fichiers des autotools (pas de ./configure)
Qt4 (>= 4.7), libqt4-sql-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.

15
TODO
View File

@ -1,18 +1,15 @@
Version 0.3
Version 0.4
Statistics (need to add months/years label on graph)
Auto completion (already up into wxwidgets 2.9)
Using tabulation to navigate throw interface (Search Panel)
Can type a letter with a comboboxes
Windows version
Choosing accounts & categories position
Cool for 0.3:
Cool for 0.5:
Database auto saving at startup
Use caches for created panels (avoid destroying/creating panels for nothing)
Add search function to web view
Need optimizations by caching operations and categories (using hastables)
Packaging for more distributions
Optimizations in GridAccount (Add/Delete operation / multiple operations)
===============================================================
Next version
@ -20,7 +17,6 @@ Next version
More translations
Printing (maybe in xml/html)
Plugins ?
WxWidgets 2.9
===============================================================
Will not be implemented
@ -38,4 +34,7 @@ it's not taken in account by UpdateStats
* If a sub operation is found using SearchPanel but not its parent
it will not be displayed. In this case we must load whole meta.
This bug can't be resolved without use of hashtable because of
complexity in searching this issue.
complexity in searching this issue.
* When changing date in a sub operation (set date > main date),
meta amount is set to 0

72
debian/Makefile vendored
View File

@ -1,72 +0,0 @@
LIB_DIR=$(DESTDIR)"/usr/lib/kisscount/"
SHARE_DIR=$(DESTDIR)"/usr/share/kisscount/"
DOC_DIR=$(DESTDIR)"/usr/share/doc/kisscount/"
BIN_DIR=$(DESTDIR)"/usr/bin/"
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
CXXFLAGS+=-I./lib/freechart/include
CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)"
CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\""
#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
LDFLAGS+=`wx-config --libs`
ifdef WIN32
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_msw_wxsqlite3-2.8
LDFLAGS+=-L./lib/freechart/lib -lwxcode_msw_freechart-2.8
else
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
endif
CXX=$(PREFIX)g++
SOURCES=$(wildcard src/model/*.cpp)
SOURCES+=$(wildcard src/view/*.cpp)
SOURCES+=$(wildcard src/view/grid/*.cpp)
SOURCES+=$(wildcard src/controller/*.cpp)
SOURCES+=src/main.cpp src/sha1.cpp src/ParseExp.cpp
HEADERS=$(wildcard src/model/*.h)
HEADERS+=$(wildcard src/view/*.h)
HEADERS+=$(wildcard src/view/grid/*.h)
HEADERS+=$(wildcard src/controller/*.h)
HEADERS+=src/main.h src/sha1.h
OBJS=$(SOURCES:.cpp=.o)
all: check kc
clean:
rm -f *~ src/*~ src/*.o src/model/*.o src/model/*~ src/view/*.o src/view/grid/*.o src/view/grid/*~ src/view/*~ src/controller/*.o src/controller/*~ kc
# %.o : src/model/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp
# $(CXX) $(CXXFLAGS) $< -c
check:
# if ! test -d lib ; then echo lib directory not found, please see INSTALL ; return 1 ; fi
#kc: $(OBJS)
# $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
kc:
cp ../kc .
generate_locales:
./tools/generate_locales.sh
ifdef WIN32
package:
./tools/package_win32.sh
else
package:
./tools/package.sh
endif
install:
mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
cp kc $(BIN_DIR)
cp -rf lib/*.so* $(LIB_DIR)
cp -rf ressources/* $(SHARE_DIR)
cp -rf README* ChangeLog CONTRIBUTORS TODO $(DOC_DIR)
remove:
rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc

1
debian/Makefile vendored Symbolic link
View File

@ -0,0 +1 @@
../Makefile

4
debian/changelog vendored
View File

@ -1,5 +1,5 @@
kisscount (0.2-1) unstable; urgency=low
kisscount (0.3-1) unstable; urgency=low
* Initial release
-- Grégory Soutadé <soutade@gmail.com> Sat, 26 Feb 2011 13:13:52 +0100
-- Grégory Soutadé <soutade@gmail.com> Sun, 24 Aug 2011 13:13:52 +0100

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: kisscount
Section: misc
Priority: extra
Maintainer: Grégory Soutadé <soutade@gmail.com>
Build-Depends: debhelper (>= 7.0.50~), libsqlite3-dev, libwxgtk2.8-dev (>= 2.8.10), libofx-dev, libxml2-dev
Build-Depends: debhelper (>= 7.0.50~), libofx-dev, libqt4-dev (>= 4.7), libqt4-sql-sqlite
Standards-Version: 3.9.1
Homepage: http://indefero.soutade.fr/p/kisscount/
Vcs-Git: git://soutade.fr/kisscount.git

4
debian/copyright vendored
View File

@ -3,12 +3,12 @@ Upstream-Name: kisscount
Source: http://indefero.soutade.fr/p/kisscount/
Files: *
Copyright: 2010-2011 Grégory Soutadé
Copyright: 2010-2012 Grégory Soutadé
License: GPL-3.0+
Files: debian/*
Copyright: 2011 Grégory Soutadé <soutade@gmail.com>
Copyright: 2012 Grégory Soutadé <soutade@gmail.com>
License: GPL-3.0+
License: GPL-3.0+

2
debian/docs vendored
View File

@ -2,4 +2,4 @@ README
README.fr
ChangeLog
TODO
CONTRIBUTORS
AUTHORS

3
debian/rules vendored
View File

@ -28,3 +28,6 @@ export DH_VERBOSE=1
override_dh_strip:
# Full compilation has already been done
override_dh_auto_clean:

View File

@ -2,7 +2,7 @@
# KissCount installation script for .tar.bz2 package
# Copyright 2010-2011 Grégory Soutadé
# Copyright 2010-2012 Grégory Soutadé
# This file is part of KissCount.
@ -19,10 +19,11 @@
# You should have received a copy of the GNU General Public License
# along with KissCount. If not, see <http://www.gnu.org/licenses/>.
ROOT_DIR=/usr/local
SHARE_DIR=$ROOT_DIR/share/kisscount
LIB_DIR=$ROOT_DIR/lib/kisscount
BIN_DIR=$ROOT_DIR/bin
DEST_DIR=""
ROOT_DIR=$DEST_DIR/usr
SHARE_DIR=$DEST_DIR$ROOT_DIR/share/kisscount
LIB_DIR=$DEST_DIR$ROOT_DIR/lib/kisscount
BIN_DIR=$DEST_DIR$ROOT_DIR/bin
case "$1" in
--install|-i)
@ -34,6 +35,7 @@ case "$1" in
sudo mkdir -p $SHARE_DIR
sudo mkdir -p $LIB_DIR
sudo mkdir -p ~/.local/share/kisscount
sudo cp -r ressources/* $SHARE_DIR
sudo cp kc $BIN_DIR
sudo cp -r lib/* $LIB_DIR
@ -47,6 +49,8 @@ case "$1" in
sudo rm -rf $LIB_DIR
sudo rm -f $BIN_DIR/kc
echo "Private database (~/.local/share/kisscount) not deleted"
echo
echo "KissCount successfully uninstalled !"
;;

6
kc.1
View File

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH KC 1 "February 26, 2011"
.TH KC 1 "February 27, 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -26,9 +26,9 @@ KissCount is a personal accounting software. Its goal is to be as simple as poss
It focuses on PERSONAL accounting (not companies/associations). You only have to enter operations and see what you have (or not).
.TP
.B bdd_file
Choose another database file than ~/.kisscount/kc.bdd
Choose another database file than ~/.local/share/kisscount/kc.bdd
.SH FILES
Default database is ~/.kisscount/kc.bdd
Default database is ~/.local/share/kisscount/kc.bdd
.SH AUTHOR
KissCount was written by <Grégory Soutadé>.
.PP

1241
lib/libkdchart/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

1027
lib/libkdchart/LICENSE.GPL Normal file

File diff suppressed because it is too large Load Diff

24
lib/libkdchart/README.txt Normal file
View File

@ -0,0 +1,24 @@
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.

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractAxis.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractCartesianDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractCoordinatePlane.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractPieDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractPolarDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractProxyModel.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractTernaryDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAbstractThreeDAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartAttributesModel.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartBackgroundAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartBarAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartBarDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartCartesianAxis.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartCartesianCoordinatePlane.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartChart.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartDataValueAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartDatasetProxyModel.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartDatasetSelector.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartDiagramObserver.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartEnums.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartFrameAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartGlobal.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartGridAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartHeaderFooter.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartLegend.h"

View File

@ -0,0 +1 @@
#include "../src/LeveyJennings/KDChartLeveyJenningsAxis.h"

View File

@ -0,0 +1 @@
#include "../src/LeveyJennings/KDChartLeveyJenningsCoordinatePlane.h"

View File

@ -0,0 +1 @@
#include "../src/LeveyJennings/KDChartLeveyJenningsDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/LeveyJennings/KDChartLeveyJenningsGrid.h"

View File

@ -0,0 +1 @@
#include "../src/LeveyJennings/KDChartLeveyJenningsGridAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartLineAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartLineDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartMarkerAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartMeasure.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPaintContext.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPalette.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPieAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPieDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPlotter.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPolarCoordinatePlane.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPolarDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartPosition.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartRelativePosition.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartRingDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartRulerAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartStockBarAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartStockDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/Ternary/KDChartTernaryAxis.h"

View File

@ -0,0 +1 @@
#include "../src/Ternary/KDChartTernaryCoordinatePlane.h"

View File

@ -0,0 +1 @@
#include "../src/Ternary/KDChartTernaryLineDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/Ternary/KDChartTernaryPointDiagram.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartTextAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartThreeDBarAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartThreeDLineAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartThreeDPieAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartValueTrackerAttributes.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartWidget.h"

View File

@ -0,0 +1 @@
#include "../src/KDChartZoomParameters.h"

View File

@ -0,0 +1 @@
#include "../src/KDTextDocument.h"

View File

@ -0,0 +1,181 @@
/********************************************************************************
** 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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QGridLayout>
#include <QtGui/QGroupBox>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QSpacerItem>
#include <QtGui/QSpinBox>
#include <QtGui/QWidget>
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<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(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

View File

@ -0,0 +1 @@
#include "../src/KDABLibFakes.h"

View File

@ -0,0 +1,80 @@
/****************************************************************************
** 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 <cmath> will define std::isnan */
#define _GLIBCPP_USE_C99 1
#endif
#include <cmath>
#ifdef Q_OS_SOLARIS
#include <sunmath.h>
#include <math.h>
#endif
#include <qglobal.h>
#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 <float.h>
#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

View File

@ -0,0 +1,182 @@
/****************************************************************************
** 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 <QList>
#include <QRectF>
#include <QPointF>
#include "KDChartZoomParameters.h"
#include <cmath>
#include <limits>
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<CoordinateTransformation> CoordinateTransformationList;
}
#endif

View File

@ -0,0 +1,156 @@
/****************************************************************************
** 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 <qglobal.h>
#include <QPainter>
#include <QRect>
#include <KDABLibFakes>
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(