Changeset 67687 in webkit
- Timestamp:
- Sep 16, 2010 6:32:42 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r67686 r67687 1 2010-09-12 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Andreas Kling. 4 5 Moved setYRotation method body out of the class (WebViewGraphicsBased) definition. 6 7 We usually separate methods whose body are larger than a few lines from the class definition. 8 9 * QtTestBrowser/webview.h: 10 (WebViewGraphicsBased::yRotation): 11 (WebViewGraphicsBased::setYRotation): 12 1 13 2010-09-12 Antonio Gomes <tonikitoo@webkit.org> 2 14 -
trunk/WebKitTools/QtTestBrowser/webview.h
r65159 r67687 88 88 bool resizesToContents() const { return m_resizesToContents; } 89 89 90 void setYRotation(qreal angle) 91 { 92 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 93 QRectF r = m_item->boundingRect(); 94 m_item->setTransform(QTransform() 95 .translate(r.width() / 2, r.height() / 2) 96 .rotate(angle, Qt::YAxis) 97 .translate(-r.width() / 2, -r.height() / 2)); 98 #endif 99 m_yRotation = angle; 100 } 101 qreal yRotation() const 102 { 103 return m_yRotation; 104 } 90 void setYRotation(qreal angle); 91 qreal yRotation() const { return m_yRotation; } 105 92 106 93 GraphicsWebView* graphicsWebView() const { return m_item; } … … 129 116 }; 130 117 118 inline void WebViewGraphicsBased::setYRotation(qreal angle) 119 { 120 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 121 QRectF r = graphicsWebView()->boundingRect(); 122 graphicsWebView()->setTransform(QTransform() 123 .translate(r.width() / 2, r.height() / 2) 124 .rotate(angle, Qt::YAxis) 125 .translate(-r.width() / 2, -r.height() / 2)); 131 126 #endif 127 m_yRotation = angle; 128 } 129 130 #endif
Note: See TracChangeset
for help on using the changeset viewer.