Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 196a0cc5ab | |||
| 2865102a55 | |||
| 473725bd18 | |||
|
|
1f75b2e0a5 | ||
|
|
2b9d7d8878 | ||
| 1d8db4b6a1 | |||
| ea6a320416 | |||
| 1fbb920cb3 | |||
| fa9f7497f5 | |||
| 0a80a781a7 | |||
| ec3ac0a8b4 | |||
| 74528b4a00 | |||
| a3a3a8499f | |||
| 951793567a | |||
| 10c534857d | |||
| cb67de5ba5 | |||
| e39de711c6 | |||
| f1de45d08a | |||
| 38770639be | |||
| fe6bb52c52 | |||
| 1628b29a35 | |||
| b36655cb26 | |||
| f3d0f77e88 | |||
|
|
e453c1270b | ||
|
|
20d7840178 | ||
|
|
ee60ec8b10 | ||
| 115ed29c17 | |||
| c9659baff0 | |||
| eba1057656 | |||
|
|
c1533e84c5 | ||
|
|
eddea6e37d | ||
| 9133973148 | |||
| caee84b38c | |||
| 202d11ba79 | |||
|
|
3e666103b8 | ||
|
|
25d805e699 | ||
|
|
e9ec135b27 | ||
|
|
b51c4d2d2d | ||
|
|
b60c0ce417 | ||
| 9ba4ca5302 | |||
| 9382a49821 | |||
| 4a8e0326aa | |||
| 76808fe700 | |||
| 0a1b9819c7 | |||
| 3c36249781 | |||
| 0d929c8b92 | |||
| 7761fbac00 | |||
| ca925d37cb | |||
|
|
70ce91324b | ||
|
|
258a3eb48d | ||
|
|
0b096d88bd | ||
|
|
5afa2480b4 | ||
|
|
5dd7abf6cf | ||
|
|
05b070a502 | ||
|
|
b1ce5fc2a2 | ||
|
|
6efa5183ab | ||
|
|
fea2136e73 | ||
|
|
85338d4b70 | ||
|
|
ada23a4092 | ||
|
|
2e70586e97 | ||
|
|
47fffc71b1 | ||
|
|
fe302d2ef5 | ||
|
|
8b0f386121 | ||
|
|
397096680c | ||
| 3684c324c0 | |||
| 74ca6a2285 | |||
| ea7491aff7 | |||
| b86b934e75 | |||
| 2b664c3b4f | |||
| 7b6d0bb870 | |||
| 53ecc806a7 | |||
| 61e2a7505c | |||
| 02b204d408 | |||
| 53cf28e397 | |||
| 6865b75da8 | |||
| fb6cb35e65 | |||
| 533442b874 | |||
| f3a66790d0 | |||
| 7003a4795d | |||
| d046f4e399 | |||
| 320d8689f6 | |||
| 0b037cff7c | |||
| 23829bdf70 | |||
| fe35930273 | |||
| 992516d972 | |||
| ed1886fe46 | |||
| 41261cf95f | |||
|
|
2e471ecbe5 | ||
| fe5e9208a3 | |||
| 9dac732efe | |||
| 7e5f13c445 | |||
| d310be1b6d | |||
| 20be059f27 | |||
| f0e0aba4f3 | |||
| efc2ce20b3 | |||
| 54945703b6 | |||
| e9e0e35c12 | |||
| 628c4a4588 | |||
| 459e07ee11 | |||
| 57d4b90182 | |||
| 899dc3db71 | |||
| 2cea83f22b | |||
| 34bbd08de6 | |||
| 2572701d34 | |||
| 6b762e0df5 | |||
| 9575705106 | |||
| e46c5292b9 | |||
| 27afbb95c6 | |||
| 68f2294b96 | |||
| d6ef8aebdb | |||
| eaba622a3f | |||
| fb2541358c | |||
| 2ec5e124da | |||
| 0d80d91a47 | |||
| e0efe42b14 | |||
| fcc7d09071 | |||
| 62a3712ff7 | |||
| e9c677f5b2 | |||
| d74ad570ad | |||
| ba24fd4a91 | |||
| 6a90c340d3 | |||
| 3e89eb7279 | |||
| 32fcf0f66d | |||
| d206d5b051 | |||
| 2645de9c16 | |||
| c5be6a2b0d | |||
| c685d4b3fb | |||
| df4228d799 | |||
| 09b0f9a656 | |||
| 5b8b17cbea | |||
| 51e348ef7b | |||
| a5572cc07b | |||
| 5f3a80b4eb | |||
| 1aa37d3110 | |||
| 3340f95393 | |||
| 24cb1df7a5 | |||
|
|
1bbf7b3ae7 | ||
| 44636c5882 |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*.o
|
||||
*.objs
|
||||
*.moc
|
||||
*~
|
||||
|
||||
105
ChangeLog
105
ChangeLog
@@ -1,3 +1,108 @@
|
||||
v0.9 (27/07/2019)
|
||||
** User **
|
||||
** Dev **
|
||||
** Bugs **
|
||||
Check index in ctrl+t, ctrl+r and suppr callback to avoid doing something on non existant operation
|
||||
|
||||
v0.8 (29/01/2019)
|
||||
** User **
|
||||
Add multi month operation support : Normal operation with description "... (XX/YY)" will be forwarded to next month
|
||||
Auto fill operation amount if it was the same for the last 3 operations
|
||||
Add quick transfert dialog (ctrl+t shortcut)
|
||||
Add ctrl+r shortcut to check/uncheck operations
|
||||
Remove delete column (replaced by Suppr shortcut)
|
||||
Fix operations not necessary bound to fix category
|
||||
** Dev **
|
||||
** Bugs **
|
||||
Current account value is badly computed if operations are not in date order
|
||||
NULLop was set with random values which can cause misunderstanding when entering a new operation
|
||||
Resize date column for new operations (can be bold while other are not)
|
||||
KissCount crash or do something wrong when selecting multiple columns for group/ungroup operations
|
||||
|
||||
|
||||
v0.7.1 (07/05/2018)
|
||||
** User **
|
||||
** Dev **
|
||||
** Bugs **
|
||||
web: start and end date only compared to current date and not selected one
|
||||
|
||||
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
|
||||
|
||||
** Dev **
|
||||
Use transactions for SQL updates
|
||||
Use prepared query for value replacement allowing to use non escaped characters
|
||||
package.sh was broken due to parsing errors in debian/changelog
|
||||
|
||||
** Bugs **
|
||||
Crash when use of a tag in a new operation
|
||||
|
||||
v0.5 (19/06/2015)
|
||||
** User **
|
||||
Add tag management
|
||||
|
||||
** Dev **
|
||||
Version 4 of database : tag added
|
||||
|
||||
** Bugs **
|
||||
Bug in generate month : if the next month has less days than the first, but there are operations on non existings days, use last day of new month.
|
||||
Bad memcpy length in localtime_r() and gmtime_r()
|
||||
|
||||
v0.4 (26/02/2013)
|
||||
** User **
|
||||
Add icons for low resolution screens
|
||||
Sort categories using translated names
|
||||
Set DateFrom to first of month for SearchBanner
|
||||
Add CSV export
|
||||
Add Cost repartition statistics to SearchBanner
|
||||
|
||||
** Dev **
|
||||
Primitive handle of low resolution screens
|
||||
Rework GridAccount
|
||||
Simplify UpdateNextMonths function
|
||||
Add "create_if_not_exsits" to Database::GetAccountAmount
|
||||
Add CostRepartitionBanner
|
||||
|
||||
** Bugs **
|
||||
Remove some bugs in GridAccount
|
||||
When user changes month or year in SearchBanner, A new date wasn't selected by default resulting in bad SQL query
|
||||
Date in search failed in january
|
||||
File was not truncated during export
|
||||
Group a non checked operation with a checked meta did not uncheck meta
|
||||
|
||||
|
||||
v0.3 (31/05/2012)
|
||||
** User **
|
||||
New interface in Qt4
|
||||
|
||||
7
INSTALL
7
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
|
||||
|
||||
65
Makefile
65
Makefile
@@ -1,26 +1,21 @@
|
||||
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/"
|
||||
BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/"
|
||||
|
||||
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+=`pkg-config --libs $(QT_PACKAGES)`
|
||||
ifndef WIN32
|
||||
LDFLAGS+=-lofx
|
||||
endif
|
||||
|
||||
CXX=$(HOST)g++
|
||||
KISSCOUNT=kc
|
||||
|
||||
QT_PACKAGES="Qt5Core Qt5Gui Qt5Sql Qt5Xml Qt5Widgets"
|
||||
CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)`
|
||||
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/
|
||||
ifdef WIN32
|
||||
CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\"" -static
|
||||
else
|
||||
CXXFLAGS+=-DRESOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC -O0
|
||||
endif
|
||||
|
||||
SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ')
|
||||
OBJS=$(SOURCES:.cpp=.o)
|
||||
@@ -28,17 +23,14 @@ 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
|
||||
ifndef WIN32
|
||||
LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)`
|
||||
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 kc
|
||||
all: mojito $(KISSCOUNT)
|
||||
|
||||
clean_all: clean clean_libkdchart
|
||||
|
||||
@@ -47,7 +39,7 @@ clean:
|
||||
find src -type f -name '*~' -delete
|
||||
find src -type f -name '*.moc' -delete
|
||||
find src -type f -name '*.objs' -delete
|
||||
rm -f kc
|
||||
rm -f $(KISSCOUNT)
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
@@ -61,18 +53,11 @@ clean:
|
||||
%.moc : %.h
|
||||
moc -nw $< -o $@
|
||||
|
||||
mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS)
|
||||
mojito : $(MOCS_OBJS)
|
||||
|
||||
kc: $(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)
|
||||
|
||||
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
|
||||
@@ -92,10 +77,10 @@ endif
|
||||
|
||||
install:
|
||||
mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
|
||||
cp kc $(BIN_DIR)
|
||||
cp -rf ressources/* $(SHARE_DIR)
|
||||
cp $(KISSCOUNT) $(BIN_DIR)
|
||||
cp -rf resources/* $(SHARE_DIR)
|
||||
rm -rf $(SHARE_DIR)/po/* # Only copy qm files
|
||||
cp -rf ressources/po/*.qm $(SHARE_DIR)/po/
|
||||
cp -rf resources/po/*.qm $(SHARE_DIR)/po/
|
||||
cp -rf README* ChangeLog AUTHORS COPYING TODO $(DOC_DIR)
|
||||
|
||||
remove:
|
||||
|
||||
4
README
4
README
@@ -1,8 +1,8 @@
|
||||
KissCount is personnal account software delivered under GPL v3 licence terms.
|
||||
|
||||
Current version is 0.3
|
||||
Current version is 0.8
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
KissCount est un logiciel de gestion de comptes personnels délivré sous licence GPL v3
|
||||
|
||||
La version actuelle est 0.3
|
||||
La version actuelle est 0.8
|
||||
|
||||
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.
|
||||
|
||||
|
||||
11
TODO
11
TODO
@@ -1,9 +1,9 @@
|
||||
Version 0.4
|
||||
Version 0.5
|
||||
|
||||
Using tabulation to navigate throw interface (Search Panel)
|
||||
Choosing accounts & categories position
|
||||
|
||||
Cool for 0.5:
|
||||
Cool for 0.6:
|
||||
Database auto saving at startup
|
||||
Use caches for created panels (avoid destroying/creating panels for nothing)
|
||||
Add search function to web view
|
||||
@@ -16,6 +16,7 @@ Next version
|
||||
|
||||
More translations
|
||||
Printing (maybe in xml/html)
|
||||
Refactor web view code
|
||||
Plugins ?
|
||||
|
||||
===============================================================
|
||||
@@ -28,13 +29,9 @@ Undo/redo
|
||||
===============================================================
|
||||
BUGS
|
||||
|
||||
* When we broke a transfert into a meta operation and re create it,
|
||||
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.
|
||||
|
||||
* When changing date in a sub operation (set date > main date),
|
||||
meta amount is set to 0
|
||||
* After manipulating some meta operation, it withdrawn
|
||||
|
||||
25
VisualStudio/KissCount.sln
Normal file
25
VisualStudio/KissCount.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2020
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KissCount", "KissCount.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64
|
||||
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64
|
||||
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1EB3846E-D898-428B-BF8E-678C4543121F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
224
VisualStudio/KissCount.vcxproj
Normal file
224
VisualStudio/KissCount.vcxproj
Normal file
@@ -0,0 +1,224 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\controller\KissCount.hpp" />
|
||||
<ClInclude Include="..\src\model\Account.hpp" />
|
||||
<ClInclude Include="..\src\model\AccountAmount.hpp" />
|
||||
<ClInclude Include="..\src\model\Category.hpp" />
|
||||
<ClInclude Include="..\src\model\Database.hpp" />
|
||||
<ClInclude Include="..\src\model\export\CSVExportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\export\ExportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\export\XMLExportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\import\GrisbiImportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\import\ImportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\import\XMLImportEngine.hpp" />
|
||||
<ClInclude Include="..\src\model\model.hpp" />
|
||||
<ClInclude Include="..\src\model\Operation.hpp" />
|
||||
<ClInclude Include="..\src\model\Tag.hpp" />
|
||||
<ClInclude Include="..\src\model\User.hpp" />
|
||||
<ClInclude Include="..\src\ParseExp.hpp" />
|
||||
<ClInclude Include="..\src\view\grid\TableViewDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\TabDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\StarDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\GridAccount.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\FormulaDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\FloatDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\DateDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\ChoiceDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\CalendarDelegate.hpp" />
|
||||
<QtMoc Include="..\src\view\grid\TransfertDialog.hpp" />
|
||||
<ClInclude Include="..\src\view\SupportedLanguages.hpp" />
|
||||
<ClInclude Include="..\src\view\view.hpp" />
|
||||
<QtMoc Include="..\src\view\wxUI.hpp" />
|
||||
<QtMoc Include="..\src\view\UsersDialog.hpp" />
|
||||
<QtMoc Include="..\src\view\StatsPanel.hpp" />
|
||||
<QtMoc Include="..\src\view\SnapshotsDialog.hpp" />
|
||||
<QtMoc Include="..\src\view\SearchPanel.hpp" />
|
||||
<QtMoc Include="..\src\view\SearchBanner.hpp" />
|
||||
<QtMoc Include="..\src\view\PreferencesPanel.hpp" />
|
||||
<QtMoc Include="..\src\view\PasswordDialog.hpp" />
|
||||
<QtMoc Include="..\src\view\ImportPanel.hpp" />
|
||||
<QtMoc Include="..\src\view\GenerateDialog.hpp" />
|
||||
<QtMoc Include="..\src\view\ExportPanel.hpp" />
|
||||
<QtMoc Include="..\src\view\CostRepartitionBanner.hpp" />
|
||||
<QtMoc Include="..\src\view\AccountPanel.hpp" />
|
||||
<ClInclude Include="..\src\win32\compat.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\controller\KissCount.cpp" />
|
||||
<ClCompile Include="..\src\main.cpp" />
|
||||
<ClCompile Include="..\src\model\Database.cpp" />
|
||||
<ClCompile Include="..\src\model\DatabaseUpdate.cpp" />
|
||||
<ClCompile Include="..\src\model\export\CSVExportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\export\ExportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\export\XMLExportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\import\GrisbiImportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\import\ImportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\import\OFXImportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\import\XMLImportEngine.cpp" />
|
||||
<ClCompile Include="..\src\model\Operation.cpp" />
|
||||
<ClCompile Include="..\src\model\User.cpp" />
|
||||
<ClCompile Include="..\src\ParseExp.cpp" />
|
||||
<ClCompile Include="..\src\view\AccountPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\CostRepartitionBanner.cpp" />
|
||||
<ClCompile Include="..\src\view\ExportPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\GenerateDialog.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\CalendarDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\ChoiceDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\DateDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\FloatDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\FormulaDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\GridAccount.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\StarDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\TabDelegate.cpp" />
|
||||
<ClCompile Include="..\src\view\grid\TransfertDialog.cpp" />
|
||||
<ClCompile Include="..\src\view\ImportPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\PasswordDialog.cpp" />
|
||||
<ClCompile Include="..\src\view\PreferencesPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\SearchBanner.cpp" />
|
||||
<ClCompile Include="..\src\view\SearchPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\SnapshotsDialog.cpp" />
|
||||
<ClCompile Include="..\src\view\StatsPanel.cpp" />
|
||||
<ClCompile Include="..\src\view\UsersDialog.cpp" />
|
||||
<ClCompile Include="..\src\view\wxUI.cpp" />
|
||||
<ClCompile Include="..\src\win32\gmtime_r.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\AUTHORS" />
|
||||
<None Include="..\ChangeLog" />
|
||||
<None Include="..\COPYING" />
|
||||
<None Include="..\INSTALL" />
|
||||
<None Include="..\install.sh" />
|
||||
<None Include="..\kc.1" />
|
||||
<None Include="..\Makefile" />
|
||||
<None Include="..\README" />
|
||||
<None Include="..\README.fr" />
|
||||
<None Include="..\resources\init.sql" />
|
||||
<None Include="..\TODO" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B12702AD-ABFB-343A-A199-8E24837244A3}</ProjectGuid>
|
||||
<Keyword>Qt4VSv1.0</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">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/"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\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)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</TreatWChar_tAsBuiltInType>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Windows</SubSystem>
|
||||
<OutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\$(ProjectName).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateDebugInformation>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Sql.lib;Qt5Widgets.lib;Qt5Xml.lib;Qt5Charts.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<QtMoc>
|
||||
<InputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(FullPath)</InputFile>
|
||||
<OutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</OutputFile>
|
||||
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|x64'">output</DynamicSource>
|
||||
<ExecutionDescription Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\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</IncludePath>
|
||||
<Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">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/"</Define>
|
||||
<QTDIR Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)</QTDIR>
|
||||
</QtMoc>
|
||||
<QtUic>
|
||||
<ExecutionDescription Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<OutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\ui_%(Filename).h</OutputFile>
|
||||
</QtUic>
|
||||
<QtRcc>
|
||||
<ExecutionDescription Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<OutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\qrc_%(Filename).cpp</OutputFile>
|
||||
</QtRcc>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">
|
||||
<QtMsBuild>$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
|
||||
<Import Project="$(QtMsBuild)\qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>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/";</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\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)</AdditionalIncludeDirectories>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Sqld.lib;Qt5Widgetsd.lib;Qt5Xmld.lib;Qt5Chartsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<QtMoc>
|
||||
<OutputFile>.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</OutputFile>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<IncludePath>.\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</IncludePath>
|
||||
<Define>UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_SQL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;RESOURCES_ROOT="kcresources/";</Define>
|
||||
</QtMoc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<OutputFile>.\GeneratedFiles\ui_%(Filename).h</OutputFile>
|
||||
</QtUic>
|
||||
<QtRcc>
|
||||
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<OutputFile>.\GeneratedFiles\qrc_%(Filename).cpp</OutputFile>
|
||||
</QtRcc>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_x64="Qt5.9.4" MocOptions="" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
310
VisualStudio/KissCount.vcxproj.filters
Normal file
310
VisualStudio/KissCount.vcxproj.filters
Normal file
@@ -0,0 +1,310 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
|
||||
<Extensions>qrc;*</Extensions>
|
||||
<ParseFiles>false</ParseFiles>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
|
||||
<Extensions>qrc;*</Extensions>
|
||||
<ParseFiles>false</ParseFiles>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
|
||||
<Extensions>moc;h;cpp</Extensions>
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\ParseExp.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\win32\compat.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\controller\KissCount.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\Account.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\AccountAmount.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\Category.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\Database.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\model.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\Operation.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\Tag.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\User.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\export\CSVExportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\export\ExportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\export\XMLExportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\import\GrisbiImportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\import\ImportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\model\import\XMLImportEngine.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\view\SupportedLanguages.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\view\view.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\view\grid\TableViewDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="..\src\view\AccountPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\CostRepartitionBanner.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\ExportPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\GenerateDialog.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\ImportPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\PasswordDialog.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\PreferencesPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\SearchBanner.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\SearchPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\SnapshotsDialog.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\StatsPanel.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\UsersDialog.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\wxUI.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\CalendarDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\ChoiceDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\DateDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\FloatDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\FormulaDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\GridAccount.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\StarDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\TabDelegate.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\src\view\grid\TransfertDialog.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ParseExp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\controller\KissCount.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\Database.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\DatabaseUpdate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\Operation.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\User.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\export\CSVExportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\export\ExportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\export\XMLExportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\import\GrisbiImportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\import\ImportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\import\OFXImportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\model\import\XMLImportEngine.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\AccountPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\CostRepartitionBanner.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\ExportPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\GenerateDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\ImportPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\PasswordDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\PreferencesPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\SearchBanner.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\SearchPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\SnapshotsDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\StatsPanel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\UsersDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\wxUI.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\CalendarDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\ChoiceDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\DateDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\FloatDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\FormulaDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\GridAccount.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\StarDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\TabDelegate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\win32\gmtime_r.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\view\grid\TransfertDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\resources\init.sql">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\AUTHORS">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\ChangeLog">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\COPYING">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\INSTALL">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\install.sh">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\kc.1">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\Makefile">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\README">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\README.fr">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\TODO">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
12
VisualStudio/KissCount.vcxproj.user
Normal file
12
VisualStudio/KissCount.vcxproj.user
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<QTDIR>C:\Qt\5.9.4\msvc2017_64</QTDIR>
|
||||
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<QTDIR>C:\Qt\5.9.4\msvc2017_64</QTDIR>
|
||||
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,5 +1,5 @@
|
||||
kisscount (0.3-1) unstable; urgency=low
|
||||
kisscount (0.8-1) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Grégory Soutadé <soutade@gmail.com> Sun, 24 Aug 2011 13:13:52 +0100
|
||||
-- Grégory Soutadé <soutade@gmail.com> Sat, 8 Oct 2016 20:26:00 +0200
|
||||
|
||||
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
||||
7
|
||||
9
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -2,7 +2,7 @@ Source: kisscount
|
||||
Section: misc
|
||||
Priority: extra
|
||||
Maintainer: Grégory Soutadé <soutade@gmail.com>
|
||||
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
|
||||
|
||||
4
debian/copyright
vendored
4
debian/copyright
vendored
@@ -3,12 +3,12 @@ Upstream-Name: kisscount
|
||||
Source: http://indefero.soutade.fr/p/kisscount/
|
||||
|
||||
Files: *
|
||||
Copyright: 2010-2012 Grégory Soutadé
|
||||
Copyright: 2010-2013 Grégory Soutadé
|
||||
|
||||
License: GPL-3.0+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2012 Grégory Soutadé <soutade@gmail.com>
|
||||
Copyright: 2013 Grégory Soutadé <soutade@gmail.com>
|
||||
License: GPL-3.0+
|
||||
|
||||
License: GPL-3.0+
|
||||
|
||||
1
debian/docs
vendored
1
debian/docs
vendored
@@ -1,5 +1,4 @@
|
||||
README
|
||||
README.fr
|
||||
ChangeLog
|
||||
TODO
|
||||
AUTHORS
|
||||
|
||||
5
debian/rules
vendored
5
debian/rules
vendored
@@ -25,9 +25,10 @@ export DH_VERBOSE=1
|
||||
|
||||
# install:
|
||||
# $(MAKE) install DESTDIR=$(CURDIR)/debian/kisscount/
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- prefix=/usr
|
||||
|
||||
override_dh_strip:
|
||||
|
||||
# Full compilation has already been done
|
||||
override_dh_auto_clean:
|
||||
override_dh_auto_clean:
|
||||
|
||||
@@ -35,7 +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 -r resources/* $SHARE_DIR
|
||||
sudo cp kc $BIN_DIR
|
||||
sudo cp -r lib/* $LIB_DIR
|
||||
|
||||
@@ -69,4 +69,4 @@ case "$1" in
|
||||
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractAxis.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractCartesianDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractCoordinatePlane.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractPieDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractPolarDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractProxyModel.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractTernaryDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAbstractThreeDAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartAttributesModel.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartBackgroundAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartBarAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartBarDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartCartesianAxis.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartCartesianCoordinatePlane.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartChart.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartDataValueAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartDatasetProxyModel.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartDatasetSelector.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartDiagramObserver.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartEnums.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartFrameAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartGlobal.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartGridAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartHeaderFooter.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartLegend.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/LeveyJennings/KDChartLeveyJenningsAxis.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/LeveyJennings/KDChartLeveyJenningsCoordinatePlane.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/LeveyJennings/KDChartLeveyJenningsDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/LeveyJennings/KDChartLeveyJenningsGrid.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/LeveyJennings/KDChartLeveyJenningsGridAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartLineAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartLineDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartMarkerAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartMeasure.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPaintContext.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPalette.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPieAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPieDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPlotter.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPolarCoordinatePlane.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPolarDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartPosition.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartRelativePosition.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartRingDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartRulerAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartStockBarAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartStockDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/Ternary/KDChartTernaryAxis.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/Ternary/KDChartTernaryCoordinatePlane.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/Ternary/KDChartTernaryLineDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/Ternary/KDChartTernaryPointDiagram.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartTextAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartThreeDBarAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartThreeDLineAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartThreeDPieAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartValueTrackerAttributes.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartWidget.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDChartZoomParameters.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDTextDocument.h"
|
||||
@@ -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 <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
|
||||
@@ -1 +0,0 @@
|
||||
#include "../src/KDABLibFakes.h"
|
||||
@@ -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 <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
|
||||
@@ -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 <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
|
||||
|
||||
@@ -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 <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()
|
||||
{
|
||||
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 );
|
||||
}
|
||||
|
||||
@@ -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 <QObject>
|
||||
|
||||
#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
|
||||
@@ -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 <KDChartBackgroundAttributes.h>
|
||||
#include <KDChartFrameAttributes.h>
|
||||
#include <KDChartTextAttributes.h>
|
||||
#include "KDChartPainterSaver_p.h"
|
||||
#include "KDChartPrintingParameters.h"
|
||||
#include <QPainter>
|
||||
|
||||
#include <KDABLibFakes>
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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 <QPointF>
|
||||
#include <QSizeF>
|
||||
#include <QRectF>
|
||||
|
||||
#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
|
||||
@@ -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 <KDABLibFakes>
|
||||
|
||||
|
||||
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 */
|
||||
|
||||
@@ -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 <KDABLibFakes>
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
*/
|
||||
@@ -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 <QWidget>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QRect>
|
||||
|
||||
#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
|
||||
@@ -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 <KDABLibFakes>
|
||||
|
||||
|
||||
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<Private*>( AbstractAreaBase::d_func() );
|
||||
}
|
||||
inline const AbstractAreaWidget::Private * AbstractAreaWidget::d_func() const
|
||||
{
|
||||
return static_cast<const Private*>( AbstractAreaBase::d_func() );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* KDCHARTABSTRACTAREAWIDGET_P_H */
|
||||
|
||||
@@ -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 <KDABLibFakes>
|
||||
|
||||
|
||||
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<Private*>( AbstractAreaBase::d_func() );
|
||||
}
|
||||
inline const AbstractArea::Private * AbstractArea::d_func() const
|
||||
{
|
||||
return static_cast<const Private*>( AbstractAreaBase::d_func() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif /* KDCHARTABSTRACTAREA_P_H */
|
||||
|
||||
@@ -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 <QDebug>
|
||||
|
||||
#include <KDABLibFakes>
|
||||
|
||||
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<const AbstractAreaBase*>(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();
|
||||
}
|
||||
@@ -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 <QObject>
|
||||
// #include <QRectF>
|
||||
// #include <QWidget>
|
||||
|
||||
#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
|
||||
@@ -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 <QQueue>
|
||||
#include <QTimer>
|
||||
|
||||
#include "KDChartAbstractArea_p.h"
|
||||
#include "KDChartAbstractDiagram.h"
|
||||
#include <KDChartTextAttributes.h>
|
||||
#include <KDChartRulerAttributes.h>
|
||||
#include <KDChartDiagramObserver.h>
|
||||
|
||||
#include <KDABLibFakes>
|
||||
|
||||
|
||||
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<AbstractDiagram*> 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<Private*>( AbstractArea::d_func() ); }
|
||||
inline const AbstractAxis::Private * AbstractAxis::d_func() const
|
||||
{ return static_cast<const Private*>( AbstractArea::d_func() ); }
|
||||
|
||||
}
|
||||
#endif /* KDCHARTAREA_P_H */
|
||||
|
||||
@@ -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 <QDebug>
|
||||
#include <QPainter>
|
||||
|
||||
#include <KDABLibFakes>
|
||||
|
||||
|
||||
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<const AbstractDiagram*>(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() );
|
||||
}
|
||||
@@ -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
|
||||
@@ -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 <KDChartAbstractDiagram_p.h>
|
||||
#include <KDChartAbstractThreeDAttributes.h>
|
||||
#include <KDChartGridAttributes.h>
|
||||
|
||||
#include <KDABLibFakes>
|
||||
|
||||
|
||||
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<Private*>( AbstractDiagram::d_func() ); }
|
||||
inline const AbstractCartesianDiagram::Private * AbstractCartesianDiagram::d_func() const
|
||||
{ return static_cast<const Private*>( AbstractDiagram::d_func() ); }
|
||||
*/
|
||||
|
||||
}
|
||||
#endif /* KDCHARTABSTRACTCARTESIANDIAGRAM_P_H */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user