git-svn-id: svn://db.shs.com.ru/libs@560 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
66
piqt_utils/piintrospector/containers_view.h
Normal file
66
piqt_utils/piintrospector/containers_view.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef CONTAINERS_VIEW_H
|
||||
#define CONTAINERS_VIEW_H
|
||||
|
||||
#include "ui_containers_view.h"
|
||||
#include <QDebug>
|
||||
#include <QWidget>
|
||||
#include "piqt.h"
|
||||
#include "piintrospection_containers_p.h"
|
||||
|
||||
|
||||
class ContainersModel: public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ContainersModel();
|
||||
|
||||
void update(const PIMap<uint, PIIntrospectionContainers::Type> & td, const PIMap<uint, PIString> & tn);
|
||||
void clear();
|
||||
|
||||
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex & child) const override {return QModelIndex();}
|
||||
QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const override;
|
||||
bool hasChildren(const QModelIndex & parent = QModelIndex()) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
QVariant data(const QModelIndex & index, int role) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex & index) const override;
|
||||
|
||||
protected:
|
||||
PIMap<uint, PIIntrospectionContainers::Type> typedata, prev_typedata;
|
||||
PIMap<uint, PIString> typenames;
|
||||
PIVector<uint> typeids;
|
||||
PIVector<llong> all, prev_all;
|
||||
bool mode_changes;
|
||||
|
||||
public slots:
|
||||
void setChangesMode(bool yes);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class ContainersView: public QWidget, private Ui::ContainersView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ContainersView(QWidget * parent = 0);
|
||||
~ContainersView();
|
||||
|
||||
void showContainers(const PIMap<uint, PIIntrospectionContainers::Type> & data, const PIMap<uint, PIString> & typenames);
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
QStringList src_header;
|
||||
ContainersModel * model;
|
||||
|
||||
private slots:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // CONTAINERS_VIEW_H
|
||||
Reference in New Issue
Block a user