Scribus
Open source desktop publishing at your fingertips
pagepalette_widgets.h
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 #ifndef PAGEPALETTE_WIDGETS_H
8 #define PAGEPALETTE_WIDGETS_H
9 
10 #include <QCheckBox>
11 #include <QDialog>
12 #include <QDragEnterEvent>
13 #include <QDragLeaveEvent>
14 #include <QDragMoveEvent>
15 #include <QDropEvent>
16 #include <QHBoxLayout>
17 #include <QImage>
18 #include <QKeyEvent>
19 #include <QLabel>
20 #include <QLayout>
21 #include <QListWidget>
22 #include <QMouseEvent>
23 #include <QPixmap>
24 #include <QPushButton>
25 #include <QSplitter>
26 #include <QTableWidget>
27 #include <QTableWidgetItem>
28 #include <QToolTip>
29 #include <QVBoxLayout>
30 
31 class QEvent;
32 
33 #include "scribusapi.h"
34 #include "scdockpalette.h"
35 
36 class ScribusView;
37 class ScribusMainWindow;
38 class PageLayouts;
39 
40 class SCRIBUS_API SeItem : public QTableWidgetItem
41 {
42  friend class PagePalette;
43  friend class PagePalette_Pages;
44  friend class SeView;
45 
46 public:
47  SeItem(QString text, uint pgnr, const QPixmap& Pix);
48  ~SeItem() {};
49 
50  const QString& getPageName();
51  uint pageNumber;
52 
53 protected:
54  QString pageName;
55 };
56 
57 class SCRIBUS_API SeList : public QListWidget
58 {
59  friend class PagePalette;
60  friend class PagePalette_Pages;
61 
62  Q_OBJECT
63 
64 public:
65  SeList(QWidget* parent);
66  ~SeList() {};
67 
68 private slots:
69  void toggleThumbnail();
70 
71 signals:
73  void thumbnailChanged();
74  void DelMaster(QString);
75 
76 protected:
77  void mouseReleaseEvent(QMouseEvent *m);
78  void mousePressEvent(QMouseEvent* e);
79  void mouseMoveEvent(QMouseEvent* e);
80  virtual void keyPressEvent(QKeyEvent* e);
81 
82  QPoint Mpos;
83  QListWidgetItem *CurItem;
84  bool Mpressed;
85  bool Thumb;
86 
87 };
88 
89 class SCRIBUS_API SeView : public QTableWidget
90 {
91  Q_OBJECT
92 
93  friend class PagePalette;
94  friend class PagePalette_Pages;
95 
96 public:
97  SeView(QWidget* parent);
98  ~SeView() {};
99 
100  void ClearPix();
101  int GetPage(int r, int c, bool *last);
102  SeItem* GetPageItem(int pageIndex);
103 
104 public slots:
105  void ToggleNam();
106 
107 signals:
108  void UseTemp(QString, int);
109  void NewPage(int, QString);
110  void movePage(int, int);
111  void Click(int, int, int);
112  void DelPage(int);
113 
114 protected:
115  virtual void dropEvent(QDropEvent * e);
116  virtual void dragEnterEvent(QDragEnterEvent *e);
117  virtual void dragLeaveEvent(QDragLeaveEvent *e);
118  virtual void dragMoveEvent(QDragMoveEvent *e);
119  virtual void mouseReleaseEvent(QMouseEvent *m);
120  virtual void mousePressEvent(QMouseEvent* e);
121  virtual void mouseMoveEvent(QMouseEvent* e);
122  virtual void keyPressEvent(QKeyEvent* e);
123 
124  QPoint Mpos;
125  bool Mpressed;
126  bool Doppel;
127  bool Links;
128  bool Namen;
129  int MaxC;
130  int colmult;
131  int rowmult;
132  int coladd;
133  int rowadd;
134  int cols;
135  int firstP;
136 };
137 
138 class SCRIBUS_API TrashBin : public QLabel
139 {
140  Q_OBJECT
141 
142 public:
143  TrashBin( QWidget * parent );
144  ~TrashBin() {};
145  void dragEnterEvent( QDragEnterEvent *e );
146  void dragLeaveEvent( QDragLeaveEvent * );
147  void dropEvent( QDropEvent * e );
148 
149 protected:
150  QPixmap Normal;
151  QPixmap Offen;
152 
153 signals:
154  void DelPage(int);
155  void DelMaster(QString);
156 };
157 
158 #endif
159 
Definition: pagepalette_widgets.h:40
Definition: pagepalette_widgets.h:57
Definition: pagepalette_widgets.h:138
Definition: pagepalette.h:33
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
A widget for changing pages layout. User can change layouts on-the-fly changing widget's comboboxes...
Definition: pagelayout.h:37
Definition: pagepalette_widgets.h:89
Definition: pagepalette_pages.h:29
Definition: scribusview.h:87