File indexing completed on 2024-04-28 05:50:49
0001 /* 0002 SPDX-FileCopyrightText: 2006-2008 Robert Knight <robertknight@gmail.com> 0003 SPDX-FileCopyrightText: 1997, 1998 Lars Doelle <lars.doelle@on-line.de> 0004 SPDX-FileCopyrightText: 2021 Jonah BrĂ¼chert <jbb@kaidan.im> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <QObject> 0012 0013 #include <Enumeration.h> 0014 0015 namespace Konsole 0016 { 0017 class TerminalDisplay; 0018 0019 class TerminalBell : public QObject 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 explicit TerminalBell(Enum::BellModeEnum bellMode); 0025 void bell(TerminalDisplay *td, const QString &message, bool terminalHasFocus); 0026 0027 /** 0028 * Sets the type of effect used to alert the user when a 'bell' occurs in the 0029 * terminal session. 0030 * 0031 * The terminal session can trigger the bell effect by calling bell() with 0032 * the alert message. 0033 */ 0034 void setBellMode(Enum::BellModeEnum mode); 0035 0036 Q_SIGNALS: 0037 void visualBell(); 0038 0039 private: 0040 Enum::BellModeEnum _bellMode; 0041 bool _bellMasked = false; 0042 }; 0043 0044 }