-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTODO
239 lines (216 loc) · 14 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
WARNING: parts of this document could be outdated (2009-12-24)
=================================================================================================
-- release checks --
=================================================================================================
- doxygen
* does doxygen complain about undocumented classes/functions?
* does doxygen work in general?
* are all images included?
- does every file have a proper copyright notice?
- check code for BUG/FIXME/WARNING string and fix it
- increase?! version number using CMakeLists.txt variable called AUTOMATE_VERSION
=================================================================================================
-- important FIXMES --
=================================================================================================
done items:
LMB doubleclick -> invoke label editor for node or connection
currently working on:
LMB on node or connection -> select node/connection
LMB+CTRL selct node/connection -> add another object to the selection
FIXME: currently the selection is canceled when there is no object to be clicked
LMB pressed + drag -> bbox for selecting objects
MMB click on nodes -> connect them
MMB on empty space ->
RMB on node/connection -> context menu
> RMB on scene -> moves the view
TODO!!!!!!
i've changed a lot in the way an object inherits from the extension class, see spring random map generator's
GraphicsItemModelExtension class, which is really good now (compared to this)
this is also true for QGraphicsView/QGraphicsScene related view handling as scrolling the scene
=========== general =====================================================
- check all casts for static_cast and dynamic_cast
- use parentWidget() and parent where possible
=========== TreeView =====================================================
- usability in TreeView: needs a mouse, no keyboard navigation possible which is bad
- nodes IDs and node_connection IDs should be unique? right now there can be cases where:
NODE::ID=1 and NODE_CONNECTION::ID=1 are the same (tested) but [todo] is this wanted?
FIX -> yes this is wanted
check if that is actually implemented right when using the TreeView to reconnect connections
FIX yes it is done right
- using TreeView and GraphicsView together:
we have two nodes, now we doubleclick one node to change the label while the TreeView is in the background, this won't update the TreeView
at once (immediately) but when alt+tab or clicking on the TreeView it gets updated. is this a bug?
>> it does however work vice versa
>> it does also work when using two TreeViews
so it is probably a bug
FIXME treeView, adding a new connection isn't marked with a '+' sign in the treeView node line!
HINT: check the row/column in dataChanged() call, maybe this is the fix?!
HINT: maybe implement hasChildren as well
HINT: if layouChanged() is used, it works BUT this is not good since it should work without!
HINT: it's working for removeRows however AND once '+' was clicked (meaning the item should expand)
it will be working when the item is removed and after no child is there anymore again an item is added
it will stop working again when you hit the '-' and try delete all + add one item again
- the view will update correctly if the widget is clicked anywhere?! why?
HINT: http://lists.trolltech.com/qt-interest/2007-06/thread00580-0.html
SOLUTION:
this is definitly a Qt bug which is either here again by regression or by intention
http://trolltech.com/developer/task-tracker/index_html?method=entry&id=78949
i can reproduce it with qt 4.3.3 and qt 4.4.0 -> [2] was taken with qt 4.4.0
with some help of irc.kde.org#qt from kibab i've made a hack* to make it
work as intended:
================ modified qtreeview.cpp ==================
if (parent != d->root /*&& !d->isIndexExpanded(parent)*/) {
QAbstractItemView::rowsInserted(parent, start, end);
// return;
}
================ modified qtreeview.cpp ==================
================ UNmodified qtreeview.cpp ==================
if (parent != d->root && !d->isIndexExpanded(parent)) {
QAbstractItemView::rowsInserted(parent, start, end);
return;
}
================ UNmodified qtreeview.cpp ==================
now recompile qt and install it...
(this fix is not complete and triggers other bugs....)
the funny thing is that the problem is for insertRows and using qt 4.2.3
(x==one of the releases) the problem was inverted since insertRows would work
there but removeRows didn't remove the + sign there.
[3] seems to cover the same issue
have fun!
* i expect some performance penalty and maybe other things as well. please
check
[1] http://trolltech.com/developer/task-tracker/index_html?method=entry&id=78949
[2] http://www.lastlog.de/misc/drawing_problem.ogg
[3] http://lists.trolltech.com/qt-interest/2007-06/thread00580-0.html
- treeView flags should only be editable if editable!
right now it's just ignoring edits which don't affect anything
=========== GraphicsView =====================================================
- i'm not using setData(...)/data(...) for QGraphicsItems to store data, is that good/bad design?
- adding a GraphicsView using the automatehandler on automates which have connections (excluding loops)
will trigger a loop which will eat up all memory and crash the system here -> see SceneItem_ConnectionHandle::paint()
- on my second pc (not my laptop) i executed automate, opened a GraphicsView and as expected
the automate application crashed with this symptoms:
1. the memory footprint rises very very fast with about 100mb/s allocation
2. next the system runs out of memory but (different to my laptop) the system killed
the automate instance freeing all memory.
3. the result was a 2gb core dump, 'gdb core automate' gave this backtrace:
(no debugging symbols found)
Core was generated by `./automate'.
Program terminated with signal 11, Segmentation fault.
[New process 7485]
#0 0x00000030fce3b8b6 in ?? () from /usr/lib64/qt4/libQtGui.so.4
(gdb) bt full
#0 0x00000030fce3b8b6 in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#1 0x00000030fce7261e in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#2 0x00000030fce6d034 in QBezier::addToPolygon () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#3 0x00000030fceaedd6 in QPainterPath::toSubpathPolygons () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#4 0x00000030fceaf5fb in QPainterPath::toFillPolygons () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#5 0x00000030fceb0312 in QPainterPath::toFillPolygons () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#6 0x00000030fcf36c44 in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#7 0x00000030fcf3744d in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#8 0x00000030fcf321dd in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#9 0x00000030fcf34794 in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#10 0x00000030fcea4fd1 in QPainter::drawEllipse () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#11 0x0000000000435c1f in SceneItem_ConnectionHandle::paint ()
No symbol table info available.
#12 0x00000030fd2b817e in ?? () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#13 0x00000030fd2ba0eb in QGraphicsScene::drawItems () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#14 0x00000030fd2d699c in QGraphicsView::paintEvent () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#15 0x00000030fcdea078 in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#16 0x00000030fd0e8eab in QFrame::event () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#17 0x00000030fd2d90db in QGraphicsView::viewportEvent () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#18 0x00000030fb52e8d7 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib64/qt4/libQtCore.so.4
the bug can be isolated to SceneItem_ConnectionHandle.cpp function paint()..
painter->drawEllipse( rectangle ); <- this will crash it, why?
- GraphicsView: items currently query the scene for the model
FIX: every item should have direct access to the model with model()
% grep -e "class.*:" src/SceneItem_*
src/SceneItem_Connection.h:class SceneItem_Connection : public QGraphicsItem {
src/SceneItem_ConnectionHandle.h:class SceneItem_ConnectionHandle : public QObject, public QGraphicsItem {
src/SceneItem_LabelEditor.h:class SceneItem_LabelEditor : public QGraphicsTextItem {
src/SceneItem_Node.h:class SceneItem_Node : public QGraphicsItem {
- GraphicsView using ctrl+a does not always select all items?!
this is probably the QGraphicsScene->sceneRect issue
- in GraphicsView a selection can be expanded when clicking a non-yet-selected item with ctrl+LMB
but if you miss that item the selection is canceled which is a bug... ;P
- - adding a new item in a GraphicsView scrolls the view towards that item, which is what i hate.
+ it is however acceptable for a connection. (currently that isn't working either)
- sceneRect for the view and for the QGraphicsScene are wrongly initialized
- after making a new connection the src node is always selected?! why?
- GraphicsView: if two nodes with no connections are visualized, then the bug can be triggered by:
1. create a connection with MMB over one node (hold the MMB) and drag it to the other node
2. a new connection is added (this is not the bug)
3. now the source node is selected - (bug) since i don't know why yet
- QGraphicsView/QGraphicsScene virtual and 'physical' screen resulution don't fit. somehow the
QGraphicsView(or -Scene) is expanded automatically (and/or reloacted) but then some items get
out of the current view while the scrollbars won't show up, so some items are just hidden and
won't be accessed easily.
renderHints : QPainter::RenderHints
resizeAnchor : ViewportAnchor
rubberBandSelectionMode : Qt::ItemSelectionMode
sceneRect : QRectF
transformationAnchor : ViewportAnchor
viewportUpdateMode : ViewportUpdateMode
- drawing the arrow does not work if the two objects are to 'near' to each other, however
sometimes the error is drawn the wrong direction
- slow painting of the scene if say 100+ items are moved (without connections!) means there
is no caching and redrawing is getting slow. disabling antialiasing makes that much faster.
- QGraphicsView
issue 1: selection of items with draging a rect should only be possible with one mousebutton
issue 2: moving the view with mouse
issue 3: creating new connections with the MIDDLE MOUSE BUTTON in the visible 'view boundaries'
should automatically scroll the scene into the direction where the mouse hits the
boundary. IDEA: when there 20 folders in kmail but 10 are in the view one can still drag
a mail to the bottom which then scrolls the view downwards so you can actually access
the lowest folder. we need the same happening here.
- SceneItem_Node, SceneItem_ConnectionHandle
on very long labels we could adjust the boundingRect() with the rendered text width/height
right now text is croped until the scene is completely redrawn most of the time the label
will be cut and this looks buggy
- graphicsView: implement layoutChanged()
traverse all QPersistentModelIndex: if valid leave if not remove them, add new ones as well
- cubicTo instead of QLine with arrow faces
- label needs caching inside a node/connection since each redraw triggers a model query
- if connectionLabel is moved between two nodes it's resizing on node move is correct
BUT if the connectionLabel is moved beyond on node it's resizing is done into the wrong direction
-> while the distance between the nodes shrinks the object moves even farer away
- moving two nodes in a way they will overlap should be handled better: connection drawing is disabled then!
- also fix object initialisation of a connection
because two overlapping connectionLabels should be drawn RED!
- ICONS for ACTIONS:
- enable/disable opengl rendering
- GraphicsScene: replace keyPressEvent code with QShortCut/QAction
- we need more caching so that item redrawing doesn't slow down every move operation
- GraphicsScene.cpp
//FIXME qt 4.4.x and 4.3.x have a bug in the BspTreeIndex methods -> removeItem(QGraphicsItem)
// since in some cases an already deleted item is queried which segfaults the program
// POSSIBLE CAUSE: maybe this isn't a bug in qt BUT in my QGraphicsItem implementation's
// boundingBox on item resize, have to track that down.
// FINAL SOLUTION: found it, it was my own SceneItem_Connection item's wrong dimension
// // QRectF SceneItem_Connection::boundingRect() const {
// // QRectF z = QRectF(-2000,-2000,4000,4000);
// // return z;
// finally showed that with that dimension it would never crash -> now i have to fix that...
- labelEditor could be impoved by selecting all text on edit
- when in labelItemEditor mode one can invoke drawing a red line with MMB on the text (instead of Xserver-paste)
- graphicsView: 'even' amount node_connections should be centered, 'odd' amounts are already rendered as intended
- zoomFit
- andreas krebs wanted to do that, nearly everything is there now, see
void mainGraphicsView::zoomFit() { in mainGraphicsView.cpp