Subversion Repositories Scribus

Rev

Rev 4430 | 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);
4679 fschmid 49
        BookMItem(QListView* parent, QListViewItem* after, int nr, PageItem *PObject);
50
        BookMItem(QListView* parent, int nr, PageItem *PObject);
2196 cbradney 51
        ~BookMItem() {};
168 Franz 52
        void SetUp(struct ScribusDoc::BookMa *Bm);
2196 cbradney 53
        virtual QString key(int, bool) const;
4679 fschmid 54
        PageItem *PageObject;
2196 cbradney 55
        int ItemNr;
56
        int PdfObj;
57
        QString Action;
58
        QString Titel;
168 Franz 59
        int First;
60
        int Last;
61
        int Prev;
62
        int Next;
63
        int Pare;
3 paul 64
};
65
 
2969 craig 66
class SCRIBUS_API BookMView : public QListView
3 paul 67
{
2196 cbradney 68
        Q_OBJECT
3 paul 69
 
70
public:
2196 cbradney 71
        BookMView(QWidget* parent);
72
        ~BookMView() {};
4679 fschmid 73
        void AddItem(QString text, QString Tit, PageItem *PageObject);
74
        void DeleteItem(PageItem *PageObject);
75
        void SetAction(PageItem *currItem, QString Act);
2196 cbradney 76
        int NrItems;
77
        bool Mpressed;
78
        QPoint Mpos;
79
        BookMItem *DraggedI;
80
        int First;
81
        int Last;
3 paul 82
 
83
public slots:
168 Franz 84
        void AddPageItem(PageItem* ite);
1957 cbradney 85
        void ChangeText(PageItem *currItem);
2196 cbradney 86
        void languageChange();
3 paul 87
 
88
signals:
168 Franz 89
        void MarkMoved();
90
        void ChangeBMNr(int, int, int);
4679 fschmid 91
        void SelectElement(PageItem *);
3 paul 92
 
93
protected:
2196 cbradney 94
        void contentsMouseReleaseEvent(QMouseEvent *m);
95
        void contentsMousePressEvent(QMouseEvent* e);
96
        void contentsMouseMoveEvent(QMouseEvent* e);
97
        void contentsDropEvent(QDropEvent *e);
98
        void contentsDragMoveEvent(QDragMoveEvent *e);
99
 
100
private:
101
        int idBookMarkCol;
3 paul 102
};
103
 
104
#endif