/usr/include/scribus/bookmwin.h is in scribus-dev 1.4.6+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | /*
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
/***************************************************************************
bookmwin.h - description
-------------------
begin : Mon Feb 11 2002
copyright : (C) 2002 by Franz Schmid
email : Franz.Schmid@altmuehlnet.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef BOOKMWIN_H
#define BOOKMWIN_H
#include <QTreeWidget>
class PageItem;
#include "scribusapi.h"
#include "scribusdoc.h"
/*! \brief Tree widget item for PDF Bookmarks.
Secret items like Pare, First, Last etc. are PDF Outlines
attributes. See PDF specification for more info.
These attrs are recomputed in the BookMView::rebuildTree()
method.
@author Franz Schmid
*/
class SCRIBUS_API BookMItem : public QTreeWidgetItem
{
public:
BookMItem(QTreeWidgetItem* parent, struct ScribusDoc::BookMa *Bm);
BookMItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, struct ScribusDoc::BookMa *Bm);
BookMItem(QTreeWidget* parent, QTreeWidgetItem* after, struct ScribusDoc::BookMa *Bm);
BookMItem(QTreeWidget* parent, struct ScribusDoc::BookMa *Bm);
BookMItem(QTreeWidget* parent, QTreeWidgetItem* after, int nr, PageItem *PObject);
BookMItem(QTreeWidget* parent, int nr, PageItem *PObject);
~BookMItem() {};
void SetUp(struct ScribusDoc::BookMa *Bm);
virtual QString key(int, bool) const;
PageItem *PageObject;
int ItemNr;
int PdfObj;
QString Action;
QString Title;
int First;
int Last;
int Prev;
int Next;
int Pare;
int level();
};
/*! \brief Tree widget for PDF Bookmarks.
It's a minimal tree implementation with D'n'D handled
in Qt4 itself. It could be rewritten into M/V/C stuff
later, but it looks it's simpler and quicker now.
MarkMoved() signal stores bookmarks in the ScribusDoc.
@author Franz Schmid
\author Petr Vanek <petr@scribus.info>
*/
class SCRIBUS_API BookMView : public QTreeWidget
{
Q_OBJECT
public:
BookMView(QWidget* parent);
~BookMView() {};
void AddItem(QString text, QString Tit, PageItem *PageObject);
void DeleteItem(PageItem *PageObject);
void SetAction(PageItem *currItem, QString Act);
int NrItems;
int First;
int Last;
/*! \brief Build scribus bookmark structure from tree items.
It looks horrible as it performs full rescan of the tree, but
it's pretty fast at all.
\author Petr vanek <petr@scribus.info>
*/
void rebuildTree();
public slots:
void AddPageItem(PageItem* ite);
void ChangeText(PageItem *currItem);
signals:
void MarkMoved();
void SelectElement(PageItem *);
void changed();
protected:
void dropEvent(QDropEvent *e);
private slots:
void setPageItem(QTreeWidgetItem * current, QTreeWidgetItem * previous);
};
#endif
|