Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
15061 fschmid 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
*/
7
/***************************************************************************
8
                          symbolpalette.h  -  description
9
                             -------------------
10
    copyright            : Scribus Team
11
 ***************************************************************************/
12
 
13
/***************************************************************************
14
 *                                                                         *
15
 *   This program is free software; you can redistribute it and/or modify  *
16
 *   it under the terms of the GNU General Public License as published by  *
17
 *   the Free Software Foundation; either version 2 of the License, or     *
18
 *   (at your option) any later version.                                   *
19
 *                                                                         *
20
 ***************************************************************************/
21
 
22
#ifndef SYMBOLPAL_H
23
#define SYMBOLPAL_H
24
 
25
#include <QDragEnterEvent>
26
#include <QDragLeaveEvent>
27
#include <QDragMoveEvent>
28
#include <QDropEvent>
29
#include <QImage>
30
#include <QListWidget>
31
#include <QMouseEvent>
32
#include <QPixmap>
33
#include <QToolTip>
34
#include <QVBoxLayout>
35
 
36
 
37
class QEvent;
38
class ScribusMainWindow;
39
class ScribusDoc;
40
 
41
 
42
#include "scribusapi.h"
16579 fschmid 43
#include "scdockpalette.h"
16729 fschmid 44
#include "sclistwidgetdelegate.h"
15061 fschmid 45
 
46
class SCRIBUS_API SymbolView : public QListWidget
47
{
48
        Q_OBJECT
49
 
50
public:
51
        SymbolView( QWidget* parent);
52
        ~SymbolView() {};
53
 
16729 fschmid 54
public slots:
55
        void HandleContextMenu(QPoint);
56
        void changeDisplay();
57
 
15061 fschmid 58
protected:
16729 fschmid 59
        bool viewportEvent(QEvent *event);
15061 fschmid 60
        void dragEnterEvent(QDragEnterEvent *e);
61
        void dragMoveEvent(QDragMoveEvent *e);
62
        void dropEvent(QDropEvent *e);
63
        void startDrag(Qt::DropActions supportedActions);
16729 fschmid 64
 
65
private:
66
        ScListWidgetDelegate* delegate;
15061 fschmid 67
};
68
 
16579 fschmid 69
class SCRIBUS_API SymbolPalette : public ScDockPalette
15061 fschmid 70
{
71
        Q_OBJECT
72
 
73
public:
74
        SymbolPalette(QWidget* parent);
75
        ~SymbolPalette() {};
76
        void setMainWindow(ScribusMainWindow *mw);
77
        void setDoc(ScribusDoc *);
78
        void unsetDoc();
16034 fschmid 79
        void editingStart(QStringList names);
16029 fschmid 80
        void editingFinished();
15061 fschmid 81
        void updateSymbolList();
82
 
83
        virtual void changeEvent(QEvent *e);
84
 
85
public slots:
16029 fschmid 86
        void handleDoubleClick(QListWidgetItem *item);
16546 jghali 87
        void handleUpdateRequest(int);
15061 fschmid 88
        void languageChange();
89
 
16029 fschmid 90
signals:
91
        void startEdit(QString);
92
        void endEdit();
93
 
15061 fschmid 94
protected:
95
        SymbolView *SymbolViewWidget;
96
        QVBoxLayout* PaletteLayout;
97
        ScribusDoc *currDoc;
98
        ScribusMainWindow *m_scMW;
16034 fschmid 99
        QStringList editItemNames;
15061 fschmid 100
};
101
 
16729 fschmid 102
#endif