WimaPolygonContainer.h 702 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#ifndef WIMAPOLYGONCONTAINER_H
#define WIMAPOLYGONCONTAINER_H

#include <QObject>
#include "WimaPolygon.h"

class WimaPolygonContainer : public QObject
{
    Q_OBJECT
public:
    WimaPolygonContainer(QObject *parent = nullptr);


    QList<WimaPolygon*>& returnItems();

    void addItem(WimaPolygon* polygon);
    void removeItem(int itemIndex);
    void removeItem(WimaPolygon* polygon);
    QList<WimaPolygon*>& returnFlatList();
20
    int count(void);
21 22 23 24 25 26 27 28 29 30 31 32 33 34

signals:
    void itemListChanged(void);

private slots:
    void setFlatListDirty(void);

private:
    QList<WimaPolygon*> _itemList;
    QList<WimaPolygon*> _flatList;
    bool                _flatListDirty;
};

#endif // WIMAPOLYGONCONTAINER_H