Scribus
Open source desktop publishing at your fingertips
bookmwin.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  bookmwin.h - description
9  -------------------
10  begin : Mon Feb 11 2002
11  copyright : (C) 2002 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef BOOKMWIN_H
25 #define BOOKMWIN_H
26 
27 #include <QTreeWidget>
28 
29 class PageItem;
30 #include "scribusapi.h"
31 #include "scribusdoc.h"
32 
40 class SCRIBUS_API BookMItem : public QTreeWidgetItem
41 {
42 public:
43  BookMItem(QTreeWidgetItem* parent, struct ScribusDoc::BookMa *Bm);
44  BookMItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, struct ScribusDoc::BookMa *Bm);
45  BookMItem(QTreeWidget* parent, QTreeWidgetItem* after, struct ScribusDoc::BookMa *Bm);
46  BookMItem(QTreeWidget* parent, struct ScribusDoc::BookMa *Bm);
47  BookMItem(QTreeWidget* parent, QTreeWidgetItem* after, int nr, PageItem *PObject);
48  BookMItem(QTreeWidget* parent, int nr, PageItem *PObject);
49  ~BookMItem() {};
50  void SetUp(struct ScribusDoc::BookMa *Bm);
51  virtual QString key(int, bool) const;
52  PageItem *PageObject;
53  int ItemNr;
54  int PdfObj;
55  QString Action;
56  QString Title;
57  int First;
58  int Last;
59  int Prev;
60  int Next;
61  int Pare;
62 
63  int level();
64 };
65 
66 
75 class SCRIBUS_API BookMView : public QTreeWidget
76 {
77  Q_OBJECT
78 
79 public:
80  BookMView(QWidget* parent);
81  ~BookMView() {};
82  void AddItem(QString text, QString Tit, PageItem *PageObject);
83  void DeleteItem(PageItem *PageObject);
84  void SetAction(PageItem *currItem, QString Act);
85 
86  int NrItems;
87  int First;
88  int Last;
89 
95  void rebuildTree();
96 
97 public slots:
98  void AddPageItem(PageItem* ite);
99  void ChangeText(PageItem *currItem);
100 
101 signals:
102  void MarkMoved();
103  void SelectElement(PageItem *, bool);
104  void changed();
105 
106 protected:
107  void dropEvent(QDropEvent *e);
108 
109 private slots:
110  void setPageItem(QTreeWidgetItem * current, QTreeWidgetItem * previous);
111 };
112 
113 #endif
Tree widget item for PDF Bookmarks. Secret items like Pare, First, Last etc. are PDF Outlines attribu...
Definition: bookmwin.h:40
Tree widget for PDF Bookmarks. It's a minimal tree implementation with D'n'D handled in Qt4 itself...
Definition: bookmwin.h:75
Definition: pageitem.h:92
Definition: scribusdoc.h:1322
Definition: actions.h:59