Subversion Repositories Scribus

Rev

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