File indexing completed on 2024-05-12 09:56:56
0001 /* 0002 SPDX-FileCopyrightText: 2020-2020 Gustavo Carneiro <gcarneiroa@hotmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef COLORFILTERHOTSPOT_H 0008 #define COLORFILTERHOTSPOT_H 0009 0010 #include "RegExpFilterHotspot.h" 0011 0012 #include <QColor> 0013 #include <QPoint> 0014 0015 namespace Konsole 0016 { 0017 class KONSOLEPRIVATE_EXPORT ColorFilterHotSpot : public RegExpFilterHotSpot 0018 { 0019 public: 0020 ColorFilterHotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList &capturedTexts, const QColor &color); 0021 ~ColorFilterHotSpot() override = default; 0022 0023 void mouseEnterEvent(TerminalDisplay *td, QMouseEvent *ev) override; 0024 void mouseLeaveEvent(TerminalDisplay *td, QMouseEvent *ev) override; 0025 0026 private: 0027 void tooltipRequested(); 0028 0029 QColor _color; 0030 QPoint _toolPos; 0031 static bool _canGenerateTooltip; 0032 }; 0033 } 0034 0035 #endif