tablemodelchart moved to test folder

This commit is contained in:
Marek Rosa 2012-04-10 16:02:16 +03:00
parent d781c0caab
commit 2e9183bac7
12 changed files with 28 additions and 28 deletions

View File

@ -14,7 +14,6 @@ SUBDIRS += \
splinechart \
stackedbarchart \
stackedbarchartdrilldown \
tablemodelchart \
zoomlinechart \
modeldata

View File

@ -1,22 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2012-03-08T14:30:24
#
#-------------------------------------------------
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
QT += core gui
TARGET = tablemodelchart
TEMPLATE = app
SOURCES += main.cpp\
tablewidget.cpp \
customtablemodel.cpp
HEADERS += tablewidget.h \
customtablemodel.h

View File

@ -110,9 +110,15 @@ void XYChartItem::handlePointAdded(int index)
QPointF point;
if (m_series->model()) {
point = calculateGeometryPoint(index - m_series->mapFirst());
if (index < m_series->mapFirst()) {
points.insert(0, point);
updateLayout(m_points, points, 0);
}
else {
points.insert(index - m_series->mapFirst(), point);
updateLayout(m_points, points, index - m_series->mapFirst());
}
}
else {
// this checks do not work correctly if model is set
Q_ASSERT(index<m_series->count());

View File

@ -0,0 +1,16 @@
!include( ../test.pri ) {
error( "Couldn't find the test.pri file!" )
}
QT += core gui
TARGET = tablemodelchart
TEMPLATE = app
SOURCES += main.cpp\
tablewidget.cpp \
customtablemodel.cpp
HEADERS += tablewidget.h \
customtablemodel.h

View File

@ -2,7 +2,8 @@ TEMPLATE = subdirs
SUBDIRS += \
chartwidgettest \
wavechart \
gdpbarchart
gdpbarchart \
tablechartmodel
!win32:{
SUBDIRS += auto