Debian Codegraph @

utils/fgqcanvas/fgcanvasgroup.h

raw symbols SCIP
1 #ifndef FGCANVASGROUP_H
2 #define FGCANVASGROUP_H
3
4 #include "fgcanvaselement.h"
5
6 class FGCanvasGroup : public FGCanvasElement
7 {
8 Q_OBJECT
9 public:
10 explicit FGCanvasGroup(FGCanvasGroup* pr, LocalProp* prop);
11
12 const FGCanvasElementVec& children() const;
13
14 void markChildZIndicesDirty() const;
15
16 bool hasChilden() const;
17
18 unsigned int childCount() const;
19
20 FGCanvasElement* childAt(unsigned int index) const;
21
22 unsigned int indexOfChild(const FGCanvasElement* e) const;
23
24 CanvasItem* createQuickItem(QQuickItem *parent) override;
25 CanvasItem* quickItem() const override
26 { return _quick; }
27
28 void removeChild(FGCanvasElement* child);
29
30 void dumpElement() override;
31 signals:
32 void childAdded();
33 void childRemoved(int index);
34
35 void canvasSizeChanged();
36 protected:
37 virtual void doPaint(FGCanvasPaintContext* context) const override;
38
39 void doPolish() override;
40
41 bool onChildAdded(LocalProp *prop) override;
42 bool onChildRemoved(LocalProp *prop) override;
43
44 virtual void markStyleDirty() override;
45
46 void doDestroy() override;
47 private:
48 void markCachedSymbolDirty();
49 int indexOfChildWithProp(LocalProp *prop) const;
50 void resetChildQuickItemZValues();
51
52 private:
53 mutable FGCanvasElementVec _children;
54 mutable bool _zIndicesDirty = false;
55 mutable bool _cachedSymbolDirty = false;
56
57
58 CanvasItem* _quick = nullptr;
59 };
60
61 #endif // FGCANVASGROUP_H