diff options
author | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-08-17 16:29:09 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-08-31 14:59:03 +0000 |
commit | 8dfa9a5dab144797e446b09979be98642403259a (patch) | |
tree | f8e9e559c39b3ce1af2ccf49f0c52f898e223551 /src/plugins/coreplugin/outputwindow.h | |
parent | cac53ea41f98e5cf0b81ca3eea696940b98caeb3 (diff) |
ZOOOOM for CompileOutputWindow and AppOutWindow
Implement zooming for the compile output and app output panes.
Those windows can be zoomed by toolbar buttons or ctrl+mousewheel.
The zoom factor is synced between app output panes, but not between
compile and app output. The scroll wheel zoom can be disabled
in the settings.
While at it, fix that the AppOutputPane did not update its font
on changes to the fontsettings.
Task-number: QTCREATORBUG-12476
Change-Id: I8a1639ab3d39c24a5fc21ed82f558f3d10efc02d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/outputwindow.h')
-rw-r--r-- | src/plugins/coreplugin/outputwindow.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/outputwindow.h b/src/plugins/coreplugin/outputwindow.h index d5738ab720..db54dc0686 100644 --- a/src/plugins/coreplugin/outputwindow.h +++ b/src/plugins/coreplugin/outputwindow.h @@ -71,6 +71,14 @@ public: void setMaxLineCount(int count); int maxLineCount() const; + void setBaseFont(const QFont &newFont); + float fontZoom() const; + void setFontZoom(float zoom); + void setWheelZoomEnabled(bool enabled); + +signals: + void wheelZoom(); + public slots: void setWordWrapEnabled(bool wrap); @@ -82,8 +90,10 @@ protected: virtual void mouseMoveEvent(QMouseEvent *e); virtual void resizeEvent(QResizeEvent *e); virtual void keyPressEvent(QKeyEvent *ev); + virtual void wheelEvent(QWheelEvent *e); private: + using QPlainTextEdit::setFont; // call setBaseFont instead, which respects the zoom factor QTimer m_scrollTimer; QTime m_lastMessage; void enableUndoRedo(); |