KDELibs4Support

klistwidget.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Reginald Stadlbauer <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef KLISTWIDGET_H
19 #define KLISTWIDGET_H
20 
21 #include <kdelibs4support_export.h>
22 
23 #include <QListWidget>
24 
41 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KListWidget : public QListWidget
42 {
43  Q_OBJECT
44 
45 public:
46  KDELIBS4SUPPORT_DEPRECATED explicit KListWidget(QWidget *parent = nullptr);
47 
48  ~KListWidget();
49 
50 Q_SIGNALS:
51 
62  void executed(QListWidgetItem *item);
63 
75  void executed(QListWidgetItem *item, const QPoint &pos);
76 
91  void doubleClicked(QListWidgetItem *item, const QPoint &pos);
92 
93 protected:
94  void keyPressEvent(QKeyEvent *e) override;
95  void focusOutEvent(QFocusEvent *e) override;
96  void leaveEvent(QEvent *e) override;
97  void mousePressEvent(QMouseEvent *e) override;
98  void mouseDoubleClickEvent(QMouseEvent *e) override;
99  void mouseReleaseEvent(QMouseEvent *e) override;
100 
101 private:
102  class KListWidgetPrivate;
103  KListWidgetPrivate *const d;
104 
105  Q_PRIVATE_SLOT(d, void _k_slotItemEntered(QListWidgetItem *))
106  Q_PRIVATE_SLOT(d, void _k_slotOnViewport())
107  Q_PRIVATE_SLOT(d, void _k_slotSettingsChanged(int))
108  Q_PRIVATE_SLOT(d, void _k_slotAutoSelect())
109  Q_PRIVATE_SLOT(d, void _k_slotEmitExecute(QListWidgetItem *))
110 };
111 
112 #endif // KLISTWIDGET_H
void doubleClicked(const QModelIndex &index)
virtual void focusOutEvent(QFocusEvent *event) override
virtual void mouseReleaseEvent(QMouseEvent *e) override
virtual void mousePressEvent(QMouseEvent *event) override
virtual void keyPressEvent(QKeyEvent *event) override
A variant of QListWidget that honors KDE&#39;s system-wide settings.
Definition: klistwidget.h:41
virtual void leaveEvent(QEvent *event)
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 22:58:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.