variantbardataproxy.h Example File
customproxy/variantbardataproxy.h
#ifndef VARIANTBARDATAPROXY_H
#define VARIANTBARDATAPROXY_H
#include "qbardataproxy.h"
#include "variantdataset.h"
#include "variantbardatamapping.h"
#include <QtCore/QStringList>
#include <QtCore/QMap>
#include <QtCore/QPointer>
using namespace QtDataVisualization;
class VariantBarDataProxy : public QBarDataProxy
{
Q_OBJECT
public:
explicit VariantBarDataProxy();
explicit VariantBarDataProxy(VariantDataSet *newSet, VariantBarDataMapping *mapping);
virtual ~VariantBarDataProxy();
void setDataSet(VariantDataSet *newSet);
VariantDataSet *dataSet();
void setMapping(VariantBarDataMapping *mapping);
VariantBarDataMapping *mapping();
public Q_SLOTS:
void handleItemsAdded(int index, int count);
void handleDataCleared();
void handleMappingChanged();
private:
void resolveDataSet();
QPointer<VariantDataSet> m_dataSet;
QPointer<VariantBarDataMapping> m_mapping;
Q_DISABLE_COPY(VariantBarDataProxy)
};
#endif