Scribus
Open source desktop publishing at your fingertips
propertiespalette.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 PROPERTIESPALETTE_H
8 #define PROPERTIESPALETTE_H
9 
10 #include <QListWidgetItem>
11 #include <QLineEdit>
12 
13 class QCloseEvent;
14 class QEvent;
15 class QFocusEvent;
16 class QToolBox;
17 class QVBoxLayout;
18 class QWidget;
19 
20 #include "scribusapi.h"
21 #include "scdockpalette.h"
22 #include "scguardedptr.h"
23 #include "scrspinbox.h"
24 #include "pageitem.h"
25 #include "linkbutton.h"
26 #include "linecombo.h"
27 #include "scguardedptr.h"
28 #include "sclistboxpixmap.h"
29 #include "scpage.h"
30 #include "spalette.h"
31 #include "sctreewidget.h"
32 
33 class ColorCombo;
34 class Cpalette;
35 class NameWidget;
44 class ScComboBox;
45 class ScribusDoc;
46 class ScribusMainWindow;
47 class Selection;
48 class UndoManager;
49 class Tpalette;
50 
51 class SCRIBUS_API PropertiesPalette : public ScDockPalette
52 {
53  Q_OBJECT
54 
55 public:
56  PropertiesPalette(QWidget* parent);
57  ~PropertiesPalette() {};
58 
59  virtual void changeEvent(QEvent *e);
60  virtual void closeEvent(QCloseEvent *closeEvent);
61 
62  void endPatchAdd();
63  void updateColorSpecialGradient();
64  void updateColorList();
65  void setGradientEditMode(bool);
66  void setTextFlowMode(PageItem::TextFlowMode mode);
67 
69  bool userActionOn(); // not yet implemented!!! This is needed badly.
70  // When user releases the mouse button or arrow key, changes must be checked
71  // and if in ScribusView a groupTransaction has been started it must be also
72  // commmited
73 
74 
75  PropertiesPalette_Group* groupPal;
76  PropertiesPalette_Image* imagePal;
77  PropertiesPalette_Line* linePal;
78  PropertiesPalette_Shadow* shadowPal;
79  PropertiesPalette_Shape* shapePal;
80  PropertiesPalette_Table* tablePal;
81  PropertiesPalette_Text* textPal;
82  PropertiesPalette_XYZ* xyzPal;
83  Cpalette *Cpal;
84  Tpalette *Tpal;
85 
86 private:
87 
88  PageItem* currentItemFromSelection();
89 
90 public slots:
91  void setMainWindow(ScribusMainWindow *mw);
92 
93  void setDoc(ScribusDoc *d);
94  void AppModeChanged();
95  void setCurrentItem(PageItem *i);
96  void unsetDoc();
97  void unsetItem();
98 
99  void handleSelectionChanged();
100 
101  void unitChange();
102  void languageChange();
103 
104  void setLocked(bool);
105 
106 private slots:
107  void SelTab(int t);
108 
109  void NewLineMode(int mode);
110  void handleGradientChanged();
111  void handleNewShape(int frameType);
112  void NewSpGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk, double cx, double cy);
113  void toggleGradientEdit(int);
114  void NewSpGradientM(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk);
115  void toggleGradientEditM();
116  void handleShapeEdit();
117 
118 protected:
119  ScribusMainWindow *m_ScMW;
120  ScTreeWidget* TabStack;
121 
122  bool m_haveDoc;
123  bool m_haveItem;
124  double m_unitRatio;
125  int m_unitIndex;
126  PageItem* m_item;
127  UndoManager *undoManager;
128 
130 
131 
132  int idXYZItem;
133  int idShapeItem;
134  int idTableItem;
135  int idTextItem;
136  int idImageItem;
137  int idLineItem;
138  int idColorsItem;
139  int idTransparencyItem;
140  int idGroupItem;
141  int idShadowItem;
142 };
143 
144 #endif
Definition: propertiespalette_line.h:23
Definition: propertiespalette_xyz.h:26
Definition: propertiespalette_group.h:20
Definition: propertiespalette_text.h:39
Definition: cpalette.h:51
Definition: propertiespalette_utils.h:92
Definition: scdockpalette.h:38
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
virtual void closeEvent(QCloseEvent *closeEvent)
Captures the close event and changes it to hide.
Definition: scdockpalette.cpp:135
TextFlowMode
Text flow mode.
Definition: pageitem.h:198
The ColorCombo widget is a combo box for displaying list of colors.
Definition: colorcombo.h:33
Definition: propertiespalette_shadow.h:20
The ScComboBox widget always uses a listbox instead of a popup, independent of any QStyle...
Definition: sccombobox.h:26
the Document Class
Definition: scribusdoc.h:90
Definition: transparencypalette.h:51
Definition: propertiespalette_shape.h:25
Definition: propertiespalette.h:51
Definition: pageitem.h:92
Definition: propertiespalette_table.h:29
UndoManager handles the undo stack.
Definition: undomanager.h:81
Definition: propertiespalette_image.h:25
Definition: sctreewidget.h:48
Definition: selection.h:34