Files
qt-creator/src/plugins/debugger/debuggericons.cpp

144 lines
8.0 KiB
C++
Raw Normal View History

/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "debuggericons.h"
using namespace Utils;
namespace Debugger {
namespace Icons {
const Icon BREAKPOINT({
{":/utils/images/filledcircle.png", Theme::IconsErrorColor}}, Icon::Tint);
const Icon BREAKPOINT_DISABLED({
{":/debugger/images/breakpoint_disabled.png", Theme::IconsErrorColor}}, Icon::Tint);
const Icon BREAKPOINT_PENDING({
{":/utils/images/filledcircle.png", Theme::IconsErrorColor},
{":/debugger/images/breakpoint_pending_overlay.png", Theme::PanelTextColorDark}}, Icon::IconStyleOptions(Icon::Tint | Icon::PunchEdges));
const Icon BREAKPOINTS(
":/debugger/images/debugger_breakpoints.png");
const Icon WATCHPOINT({
{":/utils/images/eye_open.png", Theme::TextColorNormal}}, Icon::Tint);
const Icon TRACEPOINT({
{":/utils/images/eye_open.png", Theme::TextColorNormal},
{":/debugger/images/tracepointoverlay.png", Theme::TextColorNormal}}, Icon::Tint | Icon::PunchEdges);
const Icon TRACEPOINT_TOOLBAR({
{":/utils/images/eye_open.png", Theme::IconsBaseColor},
{":/debugger/images/tracepointoverlay.png", Theme::IconsBaseColor}});
const Icon CONTINUE(
":/debugger/images/debugger_continue.png");
const Icon CONTINUE_FLAT({
{":/debugger/images/debugger_continue_1_mask.png", Theme::IconsInterruptToolBarColor},
{":/debugger/images/debugger_continue_2_mask.png", Theme::IconsRunToolBarColor},
{":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}});
const Icon DEBUG_CONTINUE_SMALL({
{":/projectexplorer/images/continue_1_small.png", Theme::IconsInterruptColor},
{":/projectexplorer/images/continue_2_small.png", Theme::IconsRunColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_CONTINUE_SMALL_TOOLBAR({
{":/projectexplorer/images/continue_1_small.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/continue_2_small.png", Theme::IconsRunToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon INTERRUPT(
":/debugger/images/debugger_interrupt.png");
const Icon INTERRUPT_FLAT({
{":/debugger/images/debugger_interrupt_mask.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}});
const Icon STOP_FLAT({
{":/debugger/images/debugger_stop_mask.png", Theme::IconsStopColor},
{":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}});
const Icon DEBUG_INTERRUPT_SMALL({
{":/utils/images/interrupt_small.png", Theme::IconsInterruptColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_INTERRUPT_SMALL_TOOLBAR({
{":/utils/images/interrupt_small.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon DEBUG_EXIT_SMALL({
{":/utils/images/stop_small.png", Theme::IconsStopColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_EXIT_SMALL_TOOLBAR({
{":/utils/images/stop_small.png", Theme::IconsStopToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon LOCATION({
{":/debugger/images/location_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/location.png", Theme::IconsWarningToolBarColor}}, Icon::Tint);
Debugger: Make most views per-engine instead of singletons This is a step towards properly supporting multiple debugger sessions side-by-side. The combined C++-and-QML engine has been removed, instead a combined setup creates now two individual engines, under a single DebuggerRunTool but mostly independent with no combined state machine. This requires a few more clicks in some cases, but makes it easier to direct e.g. interrupt requests to the interesting engine. Care has been taken to not change the UX of the single debugger session use case if possible. The fat debug button operates as-before in that case, i.e. switches to Interrupt if the single active runconfiguration runs in the debugger etc. Most views are made per-engine, running an engine creates a new Perspective, which is destroyed when the run control dies. The snapshot view remains global and becomes primary source of information on a "current engine" that receives all menu and otherwise global input. There is a new global "Breakpoint Preset" view containing all "static" breakpoint data. When an engine starts up it "claims" breakpoint it believes it can handle, but operates on a copy of the static data. The markers of the static version are suppressed as long as an engine controls a breakpoint (that inclusive all resolved locations), but are re-instatet once the engine quits. The old Breakpoint class that already contained this split per-instance was split into a new Breakpoint and a GlobalBreakpoint class, with a per-engine model for Breakpoints, and a singleton model containing GlobalBreakpoints. There is a new CppDebuggerEngine intermediate level serving as base for C++ (or, rather, "compiled") binary debugging, i.e. {Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine base that are not applicable to non-binary debuggers. Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
const Icon REVERSE_LOCATION({
{":/debugger/images/debugger_reversemode_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/debugger_reversemode.png", Theme::IconsWarningToolBarColor}}, Icon::Tint);
const Icon REVERSE_MODE({
{":/debugger/images/debugger_reversemode_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/debugger_reversemode.png", Theme::IconsInfoColor}}, Icon::Tint);
Debugger: Make most views per-engine instead of singletons This is a step towards properly supporting multiple debugger sessions side-by-side. The combined C++-and-QML engine has been removed, instead a combined setup creates now two individual engines, under a single DebuggerRunTool but mostly independent with no combined state machine. This requires a few more clicks in some cases, but makes it easier to direct e.g. interrupt requests to the interesting engine. Care has been taken to not change the UX of the single debugger session use case if possible. The fat debug button operates as-before in that case, i.e. switches to Interrupt if the single active runconfiguration runs in the debugger etc. Most views are made per-engine, running an engine creates a new Perspective, which is destroyed when the run control dies. The snapshot view remains global and becomes primary source of information on a "current engine" that receives all menu and otherwise global input. There is a new global "Breakpoint Preset" view containing all "static" breakpoint data. When an engine starts up it "claims" breakpoint it believes it can handle, but operates on a copy of the static data. The markers of the static version are suppressed as long as an engine controls a breakpoint (that inclusive all resolved locations), but are re-instatet once the engine quits. The old Breakpoint class that already contained this split per-instance was split into a new Breakpoint and a GlobalBreakpoint class, with a per-engine model for Breakpoints, and a singleton model containing GlobalBreakpoints. There is a new CppDebuggerEngine intermediate level serving as base for C++ (or, rather, "compiled") binary debugging, i.e. {Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine base that are not applicable to non-binary debuggers. Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
const Icon DIRECTION_BACKWARD({
{":/debugger/images/debugger_reversemode_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/debugger_reversemode.png", Theme::IconsInfoColor}}, Icon::Tint);
const Icon DIRECTION_FORWARD({
{":/debugger/images/location_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/location.png", Theme::IconsInfoColor}}, Icon::Tint);
const Icon APP_ON_TOP({
{":/utils/images/app-on-top.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon APP_ON_TOP_TOOLBAR({
{":/utils/images/app-on-top.png", Theme::IconsBaseColor}});
const Icon SELECT({
{":/utils/images/select.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon SELECT_TOOLBAR({
{":/utils/images/select.png", Theme::IconsBaseColor}});
const Icon EMPTY(
":/debugger/images/debugger_empty_14.png");
const Icon RECORD_ON({
{":/debugger/images/recordfill.png", Theme::IconsStopColor},
{":/debugger/images/recordoutline.png", Theme::IconsBaseColor}}, Icon::Tint | Icon::DropShadow);
const Icon RECORD_OFF({
{":/debugger/images/recordfill.png", Theme::IconsDisabledColor},
{":/debugger/images/recordoutline.png", Theme::IconsBaseColor}}, Icon::Tint | Icon::DropShadow);
const Icon STEP_OVER({
{":/debugger/images/debugger_stepover_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_OVER_TOOLBAR({
{":/debugger/images/debugger_stepover_small.png", Theme::IconsBaseColor}});
const Icon STEP_INTO({
{":/debugger/images/debugger_stepinto_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_INTO_TOOLBAR({
{":/debugger/images/debugger_stepinto_small.png", Theme::IconsBaseColor}});
const Icon STEP_OUT({
{":/debugger/images/debugger_stepout_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_OUT_TOOLBAR({
{":/debugger/images/debugger_stepout_small.png", Theme::IconsBaseColor}});
const Icon RESTART({
{":/debugger/images/debugger_restart_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon RESTART_TOOLBAR({
{":/debugger/images/debugger_restart_small.png", Theme::IconsRunToolBarColor}});
const Icon SINGLE_INSTRUCTION_MODE({
{":/debugger/images/debugger_singleinstructionmode.png", Theme::IconsBaseColor}});
const Icon MODE_DEBUGGER_CLASSIC(
":/debugger/images/mode_debug.png");
const Icon MODE_DEBUGGER_FLAT({
{":/debugger/images/mode_debug_mask.png", Theme::IconsBaseColor}});
const Icon MODE_DEBUGGER_FLAT_ACTIVE({
{":/debugger/images/mode_debug_mask.png", Theme::IconsModeDebugActiveColor}});
} // namespace Icons
} // namespace Debugger