4 #include <QAbstractItemModel>
6 #include <QTextDocument>
11 class QItemSelectionModel;
16 class SlideModel : public QAbstractItemModel, XMLObj {
20 SlideModel(VymModel *vm);
24 VymModel *getVymModel();
25 QVariant data(const QModelIndex &index, int role) const;
26 QVariant headerData(int section, Qt::Orientation orientation,
27 int role = Qt::DisplayRole) const;
29 QModelIndex index(SlideItem *fri);
30 QModelIndex index(int row, int column,
31 const QModelIndex &parent = QModelIndex()) const;
32 QModelIndex parent(const QModelIndex &index) const;
35 int rowCount(const QModelIndex &parent = QModelIndex()) const;
36 int columnCount(const QModelIndex &parent = QModelIndex()) const;
38 Qt::ItemFlags flags(const QModelIndex &index) const;
39 bool setData(const QModelIndex &index, const QVariant &value,
40 int role = Qt::EditRole);
41 bool setHeaderData(int section, Qt::Orientation orientation,
42 const QVariant &value, int role = Qt::EditRole);
44 bool insertColumns(int position, int columns,
45 const QModelIndex &parent = QModelIndex());
46 bool removeColumns(int position, int columns,
47 const QModelIndex &parent = QModelIndex());
48 bool insertRows(int position, int rows,
49 const QModelIndex &parent = QModelIndex());
50 bool removeRows(int position, int rows,
51 const QModelIndex &parent = QModelIndex());
53 SlideItem *addSlide(SlideItem *dst = NULL, int n = -1);
54 void deleteSlide(SlideItem *si);
55 bool relinkSlide(SlideItem *si, SlideItem *dst, int pos);
57 SlideItem *getItem(const QModelIndex &index) const;
58 SlideItem *getSlide(int n);
59 SlideItem *findSlideID(uint n);
62 void setSearchString(const QString &s);
63 QString getSearchString();
64 void setSearchFlags(QTextDocument::FindFlags f);
65 QTextDocument::FindFlags getSearchFlags();
69 void setSelectionModel(QItemSelectionModel *);
70 QItemSelectionModel *getSelectionModel();
71 QModelIndex getSelectedIndex();
72 SlideItem *getSelectedItem();
75 QItemSelectionModel *selModel;
76 VymModel *vymModel; // needed for saveToDir
82 QTextDocument::FindFlags searchFlags;