Subversion Repositories Scribus

Rev

Rev 2969 | Rev 4679 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 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
*/
3 paul 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 <qdialog.h>
28
#include <qlistview.h>
29
#include <qevent.h>
30
#include <qpoint.h>
31
#include <qlayout.h>
2969 craig 32
 
33
#include "scribusapi.h"
3 paul 34
#include "scribusview.h"
35
#include "scribusdoc.h"
36
#include "pageitem.h"
37
 
38
/**
2196 cbradney 39
*@author Franz Schmid
40
*/
3 paul 41
 
2969 craig 42
class SCRIBUS_API BookMItem : public QListViewItem
3 paul 43
{
44
public:
168 Franz 45
        BookMItem(QListViewItem* parent, struct ScribusDoc::BookMa *Bm);
46
        BookMItem(QListViewItem* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
47
        BookMItem(QListView* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
48
        BookMItem(QListView* parent, struct ScribusDoc::BookMa *Bm);
2196 cbradney 49
        BookMItem(QListView* parent, QListViewItem* after, int nr, int s, int el);
50
        BookMItem(QListView* parent, int nr, int s, int el);
51
        ~BookMItem() {};
168 Franz 52
        void SetUp(struct ScribusDoc::BookMa *Bm);
2196 cbradney 53
        virtual QString key(int, bool) const;
54
        int ItemNr;
55
        int Seite;
56
        int Element;
57
        int PdfObj;
58
        QString Action;
59
        QString Titel;
168 Franz 60
        int First;
61
        int Last;
62
        int Prev;
63
        int Next;
64
        int Pare;
3 paul 65
};
66
 
2969 craig 67
class SCRIBUS_API BookMView : public QListView
3 paul 68
{
2196 cbradney 69
        Q_OBJECT
3 paul 70
 
71
public:
2196 cbradney 72
        BookMView(QWidget* parent);
73
        ~BookMView() {};
74
        void AddItem(QString text, QString Tit, int s, int el);
75
        void DeleteItem(int nr);
76
        void SetAction(int nr, QString Act);
77
        int NrItems;
78
        bool Mpressed;
79
        QPoint Mpos;
80
        BookMItem *DraggedI;
81
        int First;
82
        int Last;
3 paul 83
 
84
public slots:
168 Franz 85
        void AddPageItem(PageItem* ite);
86
        void ChangeItem(int nr, int itnr);
1957 cbradney 87
        void ChangeText(PageItem *currItem);
2196 cbradney 88
        void languageChange();
3 paul 89
 
90
signals:
168 Franz 91
        void MarkMoved();
92
        void ChangeBMNr(int, int, int);
366 Franz 93
        void SelectElement(int, int);
3 paul 94
 
95
protected:
2196 cbradney 96
        void contentsMouseReleaseEvent(QMouseEvent *m);
97
        void contentsMousePressEvent(QMouseEvent* e);
98
        void contentsMouseMoveEvent(QMouseEvent* e);
99
        void contentsDropEvent(QDropEvent *e);
100
        void contentsDragMoveEvent(QDragMoveEvent *e);
101
 
102
private:
103
        int idBookMarkCol;
3 paul 104
};
105
 
106
#endif