Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
3 paul 1
/***************************************************************************
2
                          bookmwin.h  -  description
3
                             -------------------
4
    begin                : Mon Feb 11 2002
5
    copyright            : (C) 2002 by Franz Schmid
6
    email                : Franz.Schmid@altmuehlnet.de
7
 ***************************************************************************/
8
 
9
/***************************************************************************
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 ***************************************************************************/
17
 
18
#ifndef BOOKMWIN_H
19
#define BOOKMWIN_H
20
 
21
#include <qdialog.h>
22
#include <qlistview.h>
23
#include <qevent.h>
24
#include <qpoint.h>
25
#include <qlayout.h>
26
#include "scribusview.h"
27
#include "scribusdoc.h"
28
#include "pageitem.h"
29
 
30
/**
2196 cbradney 31
*@author Franz Schmid
32
*/
3 paul 33
 
34
class BookMItem : public QListViewItem
35
{
36
public:
168 Franz 37
        BookMItem(QListViewItem* parent, struct ScribusDoc::BookMa *Bm);
38
        BookMItem(QListViewItem* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
39
        BookMItem(QListView* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
40
        BookMItem(QListView* parent, struct ScribusDoc::BookMa *Bm);
2196 cbradney 41
        BookMItem(QListView* parent, QListViewItem* after, int nr, int s, int el);
42
        BookMItem(QListView* parent, int nr, int s, int el);
43
        ~BookMItem() {};
168 Franz 44
        void SetUp(struct ScribusDoc::BookMa *Bm);
2196 cbradney 45
        virtual QString key(int, bool) const;
46
        int ItemNr;
47
        int Seite;
48
        int Element;
49
        int PdfObj;
50
        QString Action;
51
        QString Titel;
168 Franz 52
        int First;
53
        int Last;
54
        int Prev;
55
        int Next;
56
        int Pare;
3 paul 57
};
58
 
59
class BookMView : public QListView
60
{
2196 cbradney 61
        Q_OBJECT
3 paul 62
 
63
public:
2196 cbradney 64
        BookMView(QWidget* parent);
65
        ~BookMView() {};
66
        void AddItem(QString text, QString Tit, int s, int el);
67
        void DeleteItem(int nr);
68
        void SetAction(int nr, QString Act);
69
        int NrItems;
70
        bool Mpressed;
71
        QPoint Mpos;
72
        BookMItem *DraggedI;
73
        int First;
74
        int Last;
3 paul 75
 
76
public slots:
168 Franz 77
        void AddPageItem(PageItem* ite);
78
        void ChangeItem(int nr, int itnr);
1957 cbradney 79
        void ChangeText(PageItem *currItem);
2196 cbradney 80
        void languageChange();
3 paul 81
 
82
signals:
168 Franz 83
        void MarkMoved();
84
        void ChangeBMNr(int, int, int);
366 Franz 85
        void SelectElement(int, int);
3 paul 86
 
87
protected:
2196 cbradney 88
        void contentsMouseReleaseEvent(QMouseEvent *m);
89
        void contentsMousePressEvent(QMouseEvent* e);
90
        void contentsMouseMoveEvent(QMouseEvent* e);
91
        void contentsDropEvent(QDropEvent *e);
92
        void contentsDragMoveEvent(QDragMoveEvent *e);
93
 
94
private:
95
        int idBookMarkCol;
3 paul 96
};
97
 
98
#endif