30 |
30 |
31 class WebChromeContainerSnippet : public ChromeSnippet |
31 class WebChromeContainerSnippet : public ChromeSnippet |
32 { |
32 { |
33 Q_OBJECT |
33 Q_OBJECT |
34 public: |
34 public: |
35 WebChromeContainerSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget); |
35 WebChromeContainerSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element); |
36 virtual ~WebChromeContainerSnippet(); |
36 virtual ~WebChromeContainerSnippet(); |
|
37 virtual void setChromeWidget(QGraphicsWidget * widget); |
37 virtual void addChild(ChromeSnippet * child); |
38 virtual void addChild(ChromeSnippet * child); |
38 QGraphicsLinearLayout* layout() { return m_layout;} |
39 QGraphicsLinearLayout* layout() { return m_layout;} |
39 QRectF ownerArea() { return m_ownerArea;} |
|
40 |
40 |
41 Q_SIGNALS: |
41 Q_SIGNALS: |
42 void childAdded(ChromeSnippet * ); |
42 void childAdded(ChromeSnippet * ); |
43 public slots: |
43 public slots: |
44 void setLayoutHeight(int height); |
44 void setLayoutHeight(int height); |
45 void setLayoutWidth(int width, bool update = false); |
45 void setLayoutWidth(qreal width, bool update = false); |
46 virtual void updateSize(QSize ); |
46 virtual void updateSize(QSize ); |
|
47 void updateSizes(); |
|
48 QRectF ownerArea() { return QRectF(m_element.geometry());} |
47 virtual void updateOwnerArea(); |
49 virtual void updateOwnerArea(); |
48 |
50 |
49 protected slots: |
51 protected slots: |
50 void positionChildren(); |
52 void positionChildren(); |
51 |
53 |
52 private: |
54 private: |
53 void setOwnerArea(); |
|
54 |
|
55 QRectF m_ownerArea; |
|
56 qreal m_layoutHeight; |
55 qreal m_layoutHeight; |
57 qreal m_layoutWidth; |
56 qreal m_layoutWidth; |
58 QGraphicsLinearLayout * m_layout; |
57 QGraphicsLinearLayout * m_layout; |
59 }; |
58 }; |
60 |
59 |