|
Krita Source Code Documentation
|
#include <KisSortedHistoryList.h>
Public Types | |
| using | compare_less = std::function<bool(const T&, const T&)> |
| using | const_iterator = typename std::vector<T>::const_iterator |
Public Member Functions | |
| int | append (const T &value) |
| T | at (int pos) const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| void | clear () |
| KisSortedHistoryList (int size) | |
| int | maxSize () const |
| void | setCompareLess (compare_less func) |
| int | size () const |
Private Member Functions | |
| bool | resortList () |
Private Attributes | |
| compare_less | m_compareLess |
| KisHistoryList< T > | m_list |
| std::vector< T > | m_sortedList |
Definition at line 14 of file KisSortedHistoryList.h.
| using KisSortedHistoryList< T >::compare_less = std::function<bool(const T&, const T&)> |
Definition at line 18 of file KisSortedHistoryList.h.
| using KisSortedHistoryList< T >::const_iterator = typename std::vector<T>::const_iterator |
Definition at line 17 of file KisSortedHistoryList.h.
|
inline |
Definition at line 21 of file KisSortedHistoryList.h.
|
inline |
Add an element to the history list
Definition at line 48 of file KisSortedHistoryList.h.
References KIS_SAFE_ASSERT_RECOVER, KisSortedHistoryList< T >::m_list, KisSortedHistoryList< T >::m_sortedList, KisSortedHistoryList< T >::resortList(), and value().
|
inline |
Definition at line 36 of file KisSortedHistoryList.h.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, KisSortedHistoryList< T >::m_sortedList, and KisSortedHistoryList< T >::size().
|
inline |
Definition at line 86 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_sortedList.
|
inline |
Definition at line 90 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_sortedList.
|
inline |
Clear all historical elements from the list
Definition at line 64 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_list, and KisSortedHistoryList< T >::m_sortedList.
|
inline |
Definition at line 72 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_list.
|
inlineprivate |
Definition at line 95 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_compareLess, KisSortedHistoryList< T >::m_list, and KisSortedHistoryList< T >::m_sortedList.
|
inline |
Set the comparison function for sorting the elements.
Set to empty function compare_less{} to disable sorting completely
Definition at line 81 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_compareLess, and KisSortedHistoryList< T >::resortList().
|
inline |
Definition at line 29 of file KisSortedHistoryList.h.
References KisSortedHistoryList< T >::m_list.
|
private |
Definition at line 110 of file KisSortedHistoryList.h.
|
private |
Definition at line 108 of file KisSortedHistoryList.h.
|
private |
Definition at line 109 of file KisSortedHistoryList.h.