Changeset View
Changeset View
Standalone View
Standalone View
klipper/popupproxy.h
Show All 14 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
15 | along with this program; see the file COPYING. If not, write to | 15 | along with this program; see the file COPYING. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | #ifndef POPUPPROXY_H | 19 | #ifndef POPUPPROXY_H | ||
20 | #define POPUPPROXY_H | 20 | #define POPUPPROXY_H | ||
21 | 21 | | |||
22 | #include <QObject> | 22 | #include <QObject> | ||
23 | #include <QRegExp> | 23 | #include <QRegularExpression> | ||
24 | 24 | | |||
25 | #include "history.h" | 25 | #include "history.h" | ||
26 | 26 | | |||
27 | class QMenu; | 27 | class QMenu; | ||
28 | 28 | | |||
29 | class HistoryItem; | 29 | class HistoryItem; | ||
30 | class KlipperPopup; | 30 | class KlipperPopup; | ||
31 | 31 | | |||
Show All 16 Lines | 40 | public: | |||
48 | 48 | | |||
49 | /** | 49 | /** | ||
50 | * Called when rebuilding the menu | 50 | * Called when rebuilding the menu | ||
51 | * Deletes any More menus.. and start (re)inserting into the toplevel menu. | 51 | * Deletes any More menus.. and start (re)inserting into the toplevel menu. | ||
52 | * @param index Items are inserted at index. | 52 | * @param index Items are inserted at index. | ||
53 | * @param filter If non-empty, only insert items that match filter as a regex | 53 | * @param filter If non-empty, only insert items that match filter as a regex | ||
54 | * @return number of items inserted. | 54 | * @return number of items inserted. | ||
55 | */ | 55 | */ | ||
56 | int buildParent( int index, const QRegExp& filter = QRegExp() ); | 56 | int buildParent( int index, const QRegularExpression &filter = QRegularExpression() ); | ||
57 | 57 | | |||
58 | public Q_SLOTS: | 58 | public Q_SLOTS: | ||
59 | void slotAboutToShow(); | 59 | void slotAboutToShow(); | ||
60 | void slotHistoryChanged(); | 60 | void slotHistoryChanged(); | ||
61 | private: | 61 | private: | ||
62 | /** | 62 | /** | ||
63 | * Insert up to m_itemsPerMenu items from spill and a new | 63 | * Insert up to m_itemsPerMenu items from spill and a new | ||
64 | * more-menu if necessary. | 64 | * more-menu if necessary. | ||
Show All 11 Lines | |||||
76 | /** | 76 | /** | ||
77 | * Delete all "More..." menus current created. | 77 | * Delete all "More..." menus current created. | ||
78 | */ | 78 | */ | ||
79 | void deleteMoreMenus(); | 79 | void deleteMoreMenus(); | ||
80 | 80 | | |||
81 | private: | 81 | private: | ||
82 | QMenu* m_proxy_for_menu; | 82 | QMenu* m_proxy_for_menu; | ||
83 | QByteArray m_spill_uuid; | 83 | QByteArray m_spill_uuid; | ||
84 | QRegExp m_filter; | 84 | QRegularExpression m_filter; | ||
85 | int m_menu_height; | 85 | int m_menu_height; | ||
86 | int m_menu_width; | 86 | int m_menu_width; | ||
87 | }; | 87 | }; | ||
88 | 88 | | |||
89 | #endif | 89 | #endif |