File indexing completed on 2024-04-28 05:50:42
0001 /* 0002 SPDX-FileCopyrightText: 1997, 1998 Lars Doelle <lars.doelle@on-line.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef HISTORYTYPE_H 0008 #define HISTORYTYPE_H 0009 0010 #include "HistoryScroll.h" 0011 #include "konsoleprivate_export.h" 0012 0013 namespace Konsole 0014 { 0015 class KONSOLEPRIVATE_EXPORT HistoryType 0016 { 0017 public: 0018 HistoryType(); 0019 virtual ~HistoryType(); 0020 0021 /** 0022 * Returns true if the history is enabled ( can store lines of output ) 0023 * or false otherwise. 0024 */ 0025 virtual bool isEnabled() const = 0; 0026 /** 0027 * Returns the maximum number of lines which this history type 0028 * can store or -1 if the history can store an unlimited number of lines. 0029 */ 0030 virtual int maximumLineCount() const = 0; 0031 /** 0032 * Converts from one type of HistoryScroll to another or if given the 0033 * same type, returns it. 0034 */ 0035 virtual void scroll(std::unique_ptr<HistoryScroll> &) const = 0; 0036 /** 0037 * Returns true if the history size is unlimited. 0038 */ 0039 bool isUnlimited() const; 0040 }; 0041 0042 } 0043 0044 #endif