home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / gradienteditor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-12-10  |  2.7 KB  |  101 lines

  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.                           gradienteditor  -  description
  9.                              -------------------
  10.     begin                : Mit Mai 26 2004
  11.     copyright            : (C) 2004 by Franz Schmid
  12.     email                : Franz.Schmid@altmuehlnet.de
  13.  ***************************************************************************/
  14.  
  15. /***************************************************************************
  16.  *                                                                         *
  17.  *   This program is free software; you can redistribute it and/or modify  *
  18.  *   it under the terms of the GNU General Public License as published by  *
  19.  *   the Free Software Foundation; either version 2 of the License, or     *
  20.  *   (at your option) any later version.                                   *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. #ifndef GRADEDITOR_H
  25. #define GRADEDITOR_H
  26.  
  27. #include <QLabel>
  28. #include <QSpinBox>
  29. #include <QLayout>
  30. #include <QList>
  31. #include <QFrame>
  32. #include <QPaintEvent>
  33. #include <QMouseEvent>
  34. #include <QVBoxLayout>
  35. #include <QHBoxLayout>
  36.  
  37. class QEvent;
  38.  
  39. #include "scribusapi.h"
  40. #include "vgradient.h"
  41.  
  42. class SCRIBUS_API GradientPreview : public QFrame
  43. {
  44.     Q_OBJECT
  45.  
  46. public:
  47.     GradientPreview(QWidget *pa);
  48.     ~GradientPreview() {};
  49.     void paintEvent(QPaintEvent *e);
  50.     void mousePressEvent(QMouseEvent *m);
  51.     void mouseReleaseEvent(QMouseEvent *);
  52.     void mouseMoveEvent(QMouseEvent *m);
  53.     void leaveEvent(QEvent*);
  54.     void enterEvent(QEvent*);
  55.     void updateDisplay();
  56.     void setActColor(QColor c, QString n, int s);
  57.     void setActTrans(double t);
  58.     void setActStep(double t);
  59.     VGradient fill_gradient;
  60.     QList<int> StopM;
  61.     bool Mpressed;
  62.     bool outside;
  63.     bool onlyselect;
  64.     int ActStop;
  65.  
  66. signals:
  67.     void selectedColor(QString, int);
  68.     void currTrans(double);
  69.     void currStep(double);
  70.     void gradientChanged();
  71. };
  72.  
  73. class SCRIBUS_API GradientEditor : public QFrame
  74. {
  75.     Q_OBJECT
  76.  
  77. public:
  78.     GradientEditor(QWidget *pa);
  79.     ~GradientEditor() {};
  80.     
  81.     virtual void changeEvent(QEvent *e);
  82.     
  83.     GradientPreview *Preview;
  84.     QLabel *Desc;
  85.     QSpinBox *Position;
  86.  
  87. public slots:
  88.     void setPos(double);
  89.     void changePos(int);
  90.     void languageChange();
  91.  
  92. signals:
  93.     void gradientChanged();
  94.  
  95. protected:
  96.     virtual bool event ( QEvent * event );
  97. };
  98.  
  99. #endif
  100.  
  101.