2013-07-05 12:14:37 +00:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2015-04-14 10:35:51 +00:00
|
|
|
** Copyright (C) 2015 The Qt Company Ltd
|
2013-08-13 08:08:56 +00:00
|
|
|
** All rights reserved.
|
2015-04-14 10:35:51 +00:00
|
|
|
** For any questions to The Qt Company, please use contact form at http://qt.io
|
2013-07-05 12:14:37 +00:00
|
|
|
**
|
2014-11-07 08:07:00 +00:00
|
|
|
** This file is part of the Qt Data Visualization module.
|
2013-07-05 12:14:37 +00:00
|
|
|
**
|
2014-11-07 08:07:00 +00:00
|
|
|
** Licensees holding valid commercial license for Qt may use this file in
|
|
|
|
|
** accordance with the Qt License Agreement provided with the Software
|
|
|
|
|
** or, alternatively, in accordance with the terms contained in a written
|
2015-04-14 10:35:51 +00:00
|
|
|
** agreement between you and The Qt Company.
|
2013-07-05 12:14:37 +00:00
|
|
|
**
|
2013-08-13 08:08:56 +00:00
|
|
|
** If you have questions regarding the use of this file, please use
|
2014-11-07 08:07:00 +00:00
|
|
|
** contact form at http://qt.io
|
2013-07-05 12:14:37 +00:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2013-08-09 11:35:07 +00:00
|
|
|
#ifndef VARIANTDATASET_H
|
|
|
|
|
#define VARIANTDATASET_H
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2014-02-17 14:18:27 +00:00
|
|
|
#include <QtCore/QScopedPointer>
|
|
|
|
|
#include <QtCore/QVariantList>
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2013-10-10 08:15:47 +00:00
|
|
|
//! [1]
|
2013-08-09 11:35:07 +00:00
|
|
|
typedef QVariantList VariantDataItem;
|
|
|
|
|
typedef QList<VariantDataItem *> VariantDataItemList;
|
2013-10-10 08:15:47 +00:00
|
|
|
//! [1]
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2013-08-09 11:35:07 +00:00
|
|
|
class VariantDataSet : public QObject
|
2013-07-05 12:14:37 +00:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2013-08-09 11:35:07 +00:00
|
|
|
explicit VariantDataSet();
|
|
|
|
|
~VariantDataSet();
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2013-10-10 08:15:47 +00:00
|
|
|
//! [0]
|
2013-07-05 12:14:37 +00:00
|
|
|
void clear();
|
|
|
|
|
|
2013-08-09 11:35:07 +00:00
|
|
|
int addItem(VariantDataItem *item);
|
|
|
|
|
int addItems(VariantDataItemList *itemList);
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2013-08-09 11:35:07 +00:00
|
|
|
const VariantDataItemList &itemList() const;
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2015-06-17 11:01:44 +00:00
|
|
|
Q_SIGNALS:
|
2013-07-05 12:14:37 +00:00
|
|
|
void itemsAdded(int index, int count);
|
|
|
|
|
void dataCleared();
|
2013-10-10 08:15:47 +00:00
|
|
|
//! [0]
|
2013-07-05 12:14:37 +00:00
|
|
|
|
|
|
|
|
private:
|
2013-08-09 11:35:07 +00:00
|
|
|
VariantDataItemList m_variantData;
|
2013-07-05 12:14:37 +00:00
|
|
|
|
2013-08-09 11:35:07 +00:00
|
|
|
Q_DISABLE_COPY(VariantDataSet)
|
2013-07-05 12:14:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|