summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
blob: ef29d5c8559a7153bb88ccdbbf879db4d5202ed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef SIMPLELIST_H_
#define SIMPLELIST_H_


#include "gvbwidget.h"
#include "listitem.h"
#include "listwidget.h"

class QGraphicsWidget;

class SimpleList : public GvbWidget
{
    Q_OBJECT

public:
    SimpleList(QGraphicsWidget *parent=0);
    virtual ~SimpleList();
    void addItem(ListItem *item);
    void insertItem(int index, ListItem *item);
    ListItem* takeItem(int row);
    ListItem* itemAt(int row);
    int itemCount() const;
    virtual void keyPressEvent(QKeyEvent *event);
    bool listItemCaching() const;
    void setListItemCaching(bool enable);

    void setTwoColumns(const bool twoColumns);
    bool twoColumns();

public slots:
    ScrollBar* verticalScrollBar() const;

private:
    Q_DISABLE_COPY(SimpleList)

    ListWidget *m_list;
};

#endif /* LISTTEST_H_ */