QtBase  v6.3.1
simplelistview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the examples of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21 ** included in the packaging of this file. Please review the following
22 ** information to ensure the GNU General Public License requirements will
23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24 **
25 ** $QT_END_LICENSE$
26 **
27 ****************************************************************************/
28 
29 #ifndef SIMPLELISTVIEW_H
30 #define SIMPLELISTVIEW_H
31 
32 #include "scrollbar.h"
33 #include "abstractscrollarea.h"
34 
36 
38 {
39  Q_OBJECT
40  Q_DECLARE_PRIVATE(SimpleListView)
41 
42 public:
43 
45  virtual ~SimpleListView();
46 
47 public:
48 
53  int itemCount();
55 
56  void setTwoColumns(const bool twoColumns);
57  bool twoColumns();
58 
59 public slots:
60 
61  void themeChange();
62  bool listItemCaching() const;
63  void setListItemCaching(bool enabled);
64 
65 protected:
66 
67  virtual void scrollContentsBy(qreal dx, qreal dy);
70  const QSizeF & constraint) const;
71 
72 private:
73 
74  SimpleListViewPrivate *d_ptr;
75 };
76 
77 #endif
QGraphicsObject * parent
the parent of the item
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.
The QSizeF class defines the size of a two-dimensional object using floating point precision.
Definition: qsize.h:235
void insertItem(int index, QGraphicsWidget *item)
QGraphicsWidget * itemAt(int row)
void setListItemCaching(bool enabled)
void addItem(QGraphicsWidget *item)
bool listItemCaching() const
void updateListContents()
virtual void scrollContentsBy(qreal dx, qreal dy)
SimpleListView(QGraphicsWidget *parent=nullptr)
virtual ~SimpleListView()
void resizeEvent(QGraphicsSceneResizeEvent *event)
QGraphicsWidget * takeItem(int row)
void setTwoColumns(const bool twoColumns)
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
SizeHint
Definition: qnamespace.h:1589
QT_END_INCLUDE_NAMESPACE typedef double qreal
Definition: qglobal.h:341
GLuint index
[2]
GLenum GLenum GLsizei const GLuint GLboolean enabled
struct _cl_event * event
Definition: qopenglext.h:2998
GLenum GLenum GLsizei void * row
Definition: qopenglext.h:2747
#define Q_OBJECT
Definition: qtmetamacros.h:158
#define slots
Definition: qtmetamacros.h:76
QGraphicsItem * item