Subversion Repositories Scribus

Rev

Rev 16546 | Rev 16729 | 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"
15061 fschmid 44
 
45
class SCRIBUS_API SymbolView : public QListWidget
46
{
47
        Q_OBJECT
48
 
49
public:
50
        SymbolView( QWidget* parent);
51
        ~SymbolView() {};
52
 
53
protected:
54
        void dragEnterEvent(QDragEnterEvent *e);
55
        void dragMoveEvent(QDragMoveEvent *e);
56
        void dropEvent(QDropEvent *e);
57
        void startDrag(Qt::DropActions supportedActions);
58
};
59
 
16579 fschmid 60
class SCRIBUS_API SymbolPalette : public ScDockPalette
15061 fschmid 61
{
62
        Q_OBJECT
63
 
64
public:
65
        SymbolPalette(QWidget* parent);
66
        ~SymbolPalette() {};
67
        void setMainWindow(ScribusMainWindow *mw);
68
        void setDoc(ScribusDoc *);
69
        void unsetDoc();
16034 fschmid 70
        void editingStart(QStringList names);
16029 fschmid 71
        void editingFinished();
15061 fschmid 72
        void updateSymbolList();
73
 
74
        virtual void changeEvent(QEvent *e);
75
 
76
public slots:
16029 fschmid 77
        void handleDoubleClick(QListWidgetItem *item);
16546 jghali 78
        void handleUpdateRequest(int);
15061 fschmid 79
        void languageChange();
80
 
16029 fschmid 81
signals:
82
        void startEdit(QString);
83
        void endEdit();
84
 
15061 fschmid 85
protected:
86
        SymbolView *SymbolViewWidget;
87
        QVBoxLayout* PaletteLayout;
88
        ScribusDoc *currDoc;
89
        ScribusMainWindow *m_scMW;
16034 fschmid 90
        QStringList editItemNames;
15061 fschmid 91
};
92
 
93
#endif