Back to index

scribus-ng  1.3.4.dfsg+svn20071115
colorm.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 #ifndef FARBMANAGER_H
00008 #define FARBMANAGER_H
00009 
00010 #include <qdialog.h>
00011 #include <qlayout.h>
00012 #include <qlistbox.h>
00013 #include <qpushbutton.h>
00014 #include <qgroupbox.h>
00015 #include <qtoolbutton.h>
00016 #include <qlabel.h>
00017 #include <qpopupmenu.h>
00018 #include <qcolor.h>
00019 #include <qtooltip.h>
00020 
00021 #include "colorsetmanager.h"
00022 #include "scribusapi.h"
00023 #include "scribusstructs.h"
00024 #include "query.h"
00025 
00026 class DynamicTip;
00027 class ScribusDoc;
00028 class ColorListBox;
00029 
00034 class SCRIBUS_API ColorManager : public QDialog
00035 {
00036        Q_OBJECT
00037 
00038 public:
00039        ColorManager( QWidget* parent, ColorList doco, ScribusDoc* doc, QString docColSet, QStringList custColSet);
00040        ~ColorManager() {};
00042        ColorList EditColors;
00044        ColorList UsedC;
00046        QMap<QString,QString> replaceMap;
00048        QStringList customColSet;
00049 
00052        QString getColorSetName();
00053 
00054 private:
00055        QToolButton* LoadColSet;
00056        ColorListBox* colorListBox;
00057        QGroupBox* ColorsGroup;
00058        QGroupBox* ColsSetGroup;
00059        QPushButton* importColorsButton;
00060        QPushButton* newColorButton;
00061        QPushButton* editColorButton;
00062        QPushButton* duplicateColorButton;
00063        QPushButton* deleteColorButton;
00064        QPushButton* deleteUnusedButton;
00065        QPushButton* saveButton;
00066        QPushButton* cancelButton;
00067        QLabel* textLabel1;
00068        QPushButton* SaveColSet;
00069        QPopupMenu* CSets;
00070        QString sColor;
00071        QColor tmpColor;
00072        QStringList DontChange;
00073        DynamicTip* dynTip;
00074        ScribusDoc* m_Doc;
00075 
00076 private slots:
00077        void saveDefaults();
00078        void loadDefaults(int id);
00080        void importColors();
00081        void deleteColor();
00082        void deleteUnusedColors();
00083        void duplicateColor();
00084        void newColor();
00085        void editColor();
00086        void selColor(QListBoxItem*);
00087        void selEditColor(QListBoxItem*);
00088        void updateCList();
00089 
00090 protected:
00091        QVBoxLayout* Layout2;
00092        QHBoxLayout* layout5;
00093        QVBoxLayout* layout3;
00094        QVBoxLayout* ColsSetGroupLayout;
00095        QVBoxLayout* Layout1;
00096        
00097        ColorSetManager csm; 
00098        int customSetStartIndex;
00099 };
00100 
00101 #endif // FARBMANAGER_H