Back to index

scribus-ng  1.3.4.dfsg+svn20071115
bookmwin.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           bookmwin.h  -  description
00009                              -------------------
00010     begin                : Mon Feb 11 2002
00011     copyright            : (C) 2002 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #ifndef BOOKMWIN_H
00025 #define BOOKMWIN_H
00026 
00027 #include <qdialog.h>
00028 #include <qlistview.h>
00029 #include <qevent.h>
00030 #include <qpoint.h>
00031 #include <qlayout.h>
00032 
00033 #include "scribusapi.h"
00034 #include "scribusview.h"
00035 #include "scribusdoc.h"
00036 #include "pageitem.h"
00037 
00042 class SCRIBUS_API BookMItem : public QListViewItem
00043 {
00044 public:
00045        BookMItem(QListViewItem* parent, struct ScribusDoc::BookMa *Bm);
00046        BookMItem(QListViewItem* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
00047        BookMItem(QListView* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm);
00048        BookMItem(QListView* parent, struct ScribusDoc::BookMa *Bm);
00049        BookMItem(QListView* parent, QListViewItem* after, int nr, PageItem *PObject);
00050        BookMItem(QListView* parent, int nr, PageItem *PObject);
00051        ~BookMItem() {};
00052        void SetUp(struct ScribusDoc::BookMa *Bm);
00053        virtual QString key(int, bool) const;
00054        PageItem *PageObject;
00055        int ItemNr;
00056        int PdfObj;
00057        QString Action;
00058        QString Titel;
00059        int First;
00060        int Last;
00061        int Prev;
00062        int Next;
00063        int Pare;
00064 };
00065 
00066 class SCRIBUS_API BookMView : public QListView
00067 {
00068        Q_OBJECT
00069 
00070 public:
00071        BookMView(QWidget* parent);
00072        ~BookMView() {};
00073        void AddItem(QString text, QString Tit, PageItem *PageObject);
00074        void DeleteItem(PageItem *PageObject);
00075        void SetAction(PageItem *currItem, QString Act);
00076        int NrItems;
00077        bool Mpressed;
00078        QPoint Mpos;
00079        BookMItem *DraggedI;
00080        int First;
00081        int Last;
00082 
00083 public slots:
00084        void AddPageItem(PageItem* ite);
00085        void ChangeText(PageItem *currItem);
00086        void languageChange();
00087 
00088 signals:
00089        void MarkMoved();
00090        void SelectElement(PageItem *);
00091        void changed();
00092 
00093 protected:
00094        void contentsMouseReleaseEvent(QMouseEvent *m);
00095        void contentsMousePressEvent(QMouseEvent* e);
00096        void contentsMouseMoveEvent(QMouseEvent* e);
00097        void contentsDropEvent(QDropEvent *e);
00098        void contentsDragMoveEvent(QDragMoveEvent *e);
00099        
00100 private:
00101        int idBookMarkCol;
00102 };
00103 
00104 #endif