Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cpalette.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           cpalette.h  -  description
00009                              -------------------
00010     begin                : Wed Apr 25 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #ifndef CPALETTE_H
00025 #define CPALETTE_H
00026 
00027 #include <qtooltip.h>
00028 #include "scribusapi.h"
00029 #include "scribusstructs.h"
00030 #include "gradienteditor.h"
00031 #include <qguardedptr.h>
00032 
00033 class ScribusDoc;
00034 class PageItem;
00035 class QListBox;
00036 class QListBoxItem;
00037 class QIconView;
00038 class QIconViewItem;
00039 class QPixmap;
00040 class QRect;
00041 class QPopupMenu;
00042 class QFont;
00043 class QLayout;
00044 class QToolButton;
00045 class QButtonGroup;
00046 class QGroupBox;
00047 class QComboBox;
00048 class QLabel;
00049 class QSpacerItem;
00050 class QSpinBox;
00051 class DynamicTip;
00052 class ColorListBox;
00053 class MSpinBox;
00054 class ScComboBox;
00055 class ScPattern;
00056 class LinkButton;
00057 
00062 class SCRIBUS_API Cpalette : public QWidget
00063 {
00064        Q_OBJECT
00065 
00066        friend class Mpalette;
00067 
00068 public:
00069        Cpalette(QWidget* parent);
00070        ~Cpalette() {};
00071 
00072        void setDocument(ScribusDoc* doc) { currentDoc = doc; }
00073        void setCurrentItem(PageItem* item);
00074        void updateFromItem();
00075 
00076 public slots:
00077        void InhaltButton();
00078        void InnenButton();
00079        void SetColors(ColorList newColorList);
00080        void updateCList();
00081        void SetPatterns(QMap<QString, ScPattern> *docPatterns);
00082        void selectPattern(QIconViewItem *c);
00083        void changePatternProps();
00084        void ToggleKette();
00085        void HChange();
00086        void VChange();
00087        void updatePatternList();
00088        void updateBoxS(QString Farbe);
00089        void selectColor(QListBoxItem *c);
00090        QColor setColor(QString farbe, int shad);
00091        void slotGrad(int nr);
00092        void slotColor(QString n, int s);
00093        void ChooseGrad(int nr);
00094        void setActFarben(QString p, QString b, int shp, int shb);
00095        void setActGradient(int typ);
00096        void setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation);
00097        void setSpecialGradient(double x1, double y1, double x2, double y2);
00098        void changeSpecial();
00099        void setActShade();
00100        void setActTrans(double, double);
00101        void changeBlendMode(int);
00102        void setActBlend(int, int);
00103        void setGradTrans(double val);
00104        void slotTrans(int val);
00105        void unitChange(double old, double neww, int ein);
00106        void languageChange();
00107 
00108 signals:
00109        void NewPen(QString);
00110        void NewBrush(QString);
00111        void NewPenShade(int);
00112        void NewBrushShade(int);
00113        void NewGradient(int);
00114        void NewPattern(QString);
00115        void NewPatternProps(double, double, double, double, double);
00116        void NewSpecial(double, double, double, double);
00117        void NewTrans(double);
00118        void NewTransS(double);
00119        void NewBlend(int);
00120        void NewBlendS(int);
00121        void modeChanged();
00122        void gradientChanged();
00123        void editGradient();
00124 
00125 protected:
00126        QVBoxLayout* Form1Layout;
00127        QHBoxLayout* Layout1;
00128        QGridLayout* Layout1t;
00129        QVBoxLayout* GradLayout;
00130        QGridLayout* freeGradientLayout;
00131        QPixmap alertIcon;
00132        QPixmap cmykIcon;
00133        QPixmap rgbIcon;
00134        QPixmap spotIcon;
00135        QPixmap regIcon;
00136        DynamicTip* dynTip;
00137 
00138        ColorListBox *colorListQLBox;
00139        QFrame* patternFrame;
00140        QIconView *patternBox;
00141        QGroupBox* groupOffset;
00142        QLabel* textLabel1;
00143        MSpinBox* spinXoffset;
00144        QLabel* textLabel2;
00145        MSpinBox* spinYoffset;
00146        QGroupBox* groupScale;
00147        QLabel* textLabel5;
00148        MSpinBox* spinXscaling;
00149        QLabel* textLabel6;
00150        MSpinBox* spinYscaling;
00151        LinkButton* keepScaleRatio;
00152        QGroupBox* groupRotation;
00153        QLabel* textLabel7;
00154        MSpinBox* spinAngle;
00155        QVBoxLayout* frame3Layout;
00156        QHBoxLayout* groupOffsetLayout;
00157        QGridLayout* groupScaleLayout;
00158        QHBoxLayout* groupRotationLayout;
00159 
00160        QToolButton *Inhalt;
00161        QToolButton *Innen;
00162        QSpinBox *PM1;
00163        QComboBox* gradientQCombo;
00164        GradientEditor* gradEdit;
00165        QFrame* freeGradientQFrame;
00166        QLabel* GTextX1;
00167        QLabel* GTextY1;
00168        QLabel* GTextX2;
00169        QLabel* GTextY2;
00170        MSpinBox* gY1;
00171        MSpinBox* gX2;
00172        MSpinBox* gX1;
00173        MSpinBox* gY2;
00174        QToolButton *gradEditButton;
00175        QLabel* TransTxt;
00176        QLabel* TransTxt2;
00177        QLabel* ShadeTxt;
00178        QGroupBox* TransGroup;
00179        QSpinBox* TransSpin;
00180        QGuardedPtr<ScribusDoc> currentDoc;
00181        PageItem* currentItem;
00182        ScComboBox* blendMode;
00183        int Mode;
00184        QString sFarbe;
00185        ColorList colorList;
00186        QMap<QString, ScPattern> *patternList;
00187        bool CSichtbar;
00188        QString Color;
00189        int Shade;
00190        QString Color3;
00191        int Shade3;
00192        bool GradientMode;
00193        int currentGradient;
00194        QSpacerItem *selectorQSpacer;
00195 };
00196 
00197 #endif