Subversion Repositories Scribus

Rev

Rev 455 | Rev 2196 | 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
/**
31
  *@author Franz Schmid
32
  */
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);
3 paul 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);
3 paul 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
{
61
    Q_OBJECT
62
 
63
public:
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;
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);
3 paul 80
 
81
signals:
168 Franz 82
        void MarkMoved();
83
        void ChangeBMNr(int, int, int);
366 Franz 84
        void SelectElement(int, int);
3 paul 85
 
86
protected:
87
    void contentsMouseReleaseEvent(QMouseEvent *m);
88
    void contentsMousePressEvent(QMouseEvent* e);
89
    void contentsMouseMoveEvent(QMouseEvent* e);
90
    void contentsDropEvent(QDropEvent *e);
91
    void contentsDragMoveEvent(QDragMoveEvent *e);
92
};
93
 
94
#endif