several conversions to smart pointers
This commit is contained in:
+11
-11
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
class Media;
|
||||
#include "project/media.h"
|
||||
|
||||
class ProjectModel : public QAbstractItemModel
|
||||
{
|
||||
@@ -35,29 +35,29 @@ public:
|
||||
void make_root();
|
||||
void destroy_root();
|
||||
void clear();
|
||||
Media* get_root();
|
||||
Media* get_root();
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const override;
|
||||
QModelIndex index(int row, int column,
|
||||
const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex create_index(int arow, int acolumn, void *aid);
|
||||
QModelIndex create_index(int arow, int acolumn, void *adata);
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
Media *getItem(const QModelIndex &index) const;
|
||||
Media* getItem(const QModelIndex &index) const;
|
||||
|
||||
void appendChild(Media* parent, Media* child);
|
||||
void moveChild(Media *child, Media *to);
|
||||
void removeChild(Media *parent, Media* m);
|
||||
Media *child(int i, Media* parent = nullptr);
|
||||
int childCount(Media* parent = nullptr);
|
||||
void set_icon(Media* m, const QIcon &ico);
|
||||
void appendChild(Media* parent, Media* child);
|
||||
void moveChild(Media* child, Media* to);
|
||||
void removeChild(Media* parent, Media* m);
|
||||
Media* child(int i, Media* parent = nullptr);
|
||||
int childCount(Media* parent = nullptr);
|
||||
void set_icon(Media* m, const QIcon &ico);
|
||||
|
||||
private:
|
||||
Media* root_item;
|
||||
Media* root_item;
|
||||
};
|
||||
|
||||
#endif // PROJECTMODEL_H
|
||||
|
||||
Reference in New Issue
Block a user