From 0978901b73f8061b709af06953bc8a9cac77f74e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 1 Mar 2019 15:18:40 +0100 Subject: ProjectExplorer: Introduce dedicated output settings pages One page for application output, one for build output. The respective settings are now easier to find, and the general Build & Run settings page looks more tidy now. We will also be able to link directly to the respective settings from some button in the output panes in the future. As a side effect, this patch also introduces a dedicated "word-wrap output" setting for the compile output pane. It used to share this setting with the application output pane, which was not obvious and might not be what the user wants. Change-Id: I5629363863ffe38e0faa006d361ec21484b593f4 Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/appoutputpane.h | 32 ++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'src/plugins/projectexplorer/appoutputpane.h') diff --git a/src/plugins/projectexplorer/appoutputpane.h b/src/plugins/projectexplorer/appoutputpane.h index fc7ac6e05e..582ad653d9 100644 --- a/src/plugins/projectexplorer/appoutputpane.h +++ b/src/plugins/projectexplorer/appoutputpane.h @@ -25,13 +25,16 @@ #pragma once -#include -#include +#include "projectexplorersettings.h" #include +#include #include +#include +#include + QT_BEGIN_NAMESPACE class QTabWidget; class QToolButton; @@ -98,6 +101,9 @@ public: void appendMessage(ProjectExplorer::RunControl *rc, const QString &out, Utils::OutputFormat format); + const AppOutputSettings &settings() const { return m_settings; } + void setSettings(const AppOutputSettings &settings); + private: void reRunRunControl(); void stopRunControl(); @@ -137,9 +143,12 @@ private: void handleOldOutput(Core::OutputWindow *window) const; void updateCloseActions(); void updateFontSettings(); - void saveSettings(); + void storeZoomFactor(); void updateBehaviorSettings(); + void loadSettings(); + void storeSettings() const; + QWidget *m_mainWidget; TabWidget *m_tabWidget; QVector m_runControlTabs; @@ -155,6 +164,23 @@ private: QToolButton *m_zoomOutButton; QWidget *m_formatterWidget; float m_zoom; + AppOutputSettings m_settings; +}; + +class AppOutputSettingsPage : public Core::IOptionsPage +{ + Q_OBJECT + +public: + AppOutputSettingsPage(); + +private: + QWidget *widget() override; + void apply() override; + void finish() override; + + class SettingsWidget; + QPointer m_widget; }; } // namespace Internal -- cgit v1.2.1