Scribus
Open source desktop publishing at your fingertips
polygonwidget.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 POLYGONWIDGET_H
8 #define POLYGONWIDGET_H
9 
10 #include <QWidget>
11 #include "scribusapi.h"
12 #include "ui_polygonwidgetbase.h"
13 struct toolPrefs;
14 class SCRIBUS_API PolygonWidget : public QWidget, Ui::PolygonWidgetBase
15 {
16  Q_OBJECT
17 
18  public:
19  PolygonWidget(QWidget* parent);
20  PolygonWidget(QWidget* parent, int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature, bool forEditMode = false);
21  ~PolygonWidget() {};
22 
23  void setValues(int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature);
24  void getValues(int* polyCorners, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature, double* polyInnerRot, double* polyOuterCurvature);
25  void restoreDefaults(struct ItemToolPrefs *prefsData);
26  void saveGuiToPrefs(struct ItemToolPrefs *prefsData);
27 
28  protected slots:
29  void setFactorSlider(double a);
30  void setRotationSlider(double a);
31  void setInnerRotationSlider(double a);
32  void setCurvatureSlider(double a);
33  void setOuterCurvatureSlider(double a);
34  void updatePreview();
35  double GetZeroFactor();
36  double GetMaxFactor();
37  double GetFactor();
38 
39  protected:
40  double getUserValFromFactor(double factor);
41  double PFactor;
42  void connectSignals(bool);
43  bool editMode;
44 
45  signals:
46  void NewVectors(int, double, bool, double, double, double, double);
47 };
48 
49 #endif
Definition: prefsstructs.h:221
Definition: polygonwidget.h:14