Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef RESOURCEBROWSERVIEW_HPP
#define RESOURCEBROWSERVIEW_HPP
#include <QColumnView>
#include "orthancitem.hpp"
class ResourceBrowserModel:public QAbstractItemModel{
Q_OBJECT
OrthancRoot root;
OrthancItem *parentFromIndex(const QModelIndex &idx)const;
QAtomicPointer<OrthancItem> m_populating;
public:
ResourceBrowserModel(QString request, QObject *parent=NULL);
void updatePreview(const QModelIndex &index, QGraphicsView *preview);
// QAbstractItemModel interface
public:
QModelIndex index(int row, int column, const QModelIndex &parent) const;
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
// QAbstractItemModel interface
public:
bool hasChildren(const QModelIndex &parent) const;
public slots:
void onChildReady(QModelIndex parent, OrthancItem *child, int at);
// QAbstractItemModel interface
public:
bool canFetchMore(const QModelIndex &parent) const;
// QAbstractItemModel interface
public:
QMimeData *mimeData(const QModelIndexList &indexes) const;
Qt::DropActions supportedDragActions() const;
Qt::ItemFlags flags(const QModelIndex &index) const;
};
class ResourceBrowserView : public QColumnView
{
Q_OBJECT
public:
explicit ResourceBrowserView(QWidget *parent = 0);
public slots:
void onUpdatePreview(const QModelIndex &index);
};
#endif // RESOURCEBROWSERVIEW_HPP