Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

barcodegenerator.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 #ifndef BARCODEGENERATOR_H
00009 #define BARCODEGENERATOR_H
00010 
00011 #include "ui_barcodegenerator.h"
00012 
00013 class QColor;
00014 class QLabel;
00015 class QString;
00016 
00017 
00021 class BarcodeType
00022 {
00023     public:
00025         BarcodeType(){};
00032         BarcodeType(QString cmd, QString exa,
00033                     QString comm, QString regExp,
00034                    bool includeCheck=false, bool includeCheckInText=false);
00035         ~BarcodeType(){};
00037         QString command;
00039         QString example;
00041         QString comment;
00043         QString regularExp;
00044         bool includeCheck;
00045         bool includeCheckInText;
00046 };
00047 
00048 
00050 typedef QMap<QString, BarcodeType> BarcodeMap;
00051 
00052 
00059 class BarcodeGenerator : public QDialog
00060 {
00061     Q_OBJECT
00062 
00063     public:
00067         BarcodeGenerator(QWidget* parent = 0, const char* name = 0);
00069         ~BarcodeGenerator();
00070 
00071     protected:
00073         Ui::BarcodeGeneratorBase ui;
00074 
00076         BarcodeMap map;
00078         QColor lnColor;
00080         QColor txtColor;
00082         QColor bgColor;
00084         QString psCommand;
00086         QString tmpFile;
00088         QString psFile;
00091         bool useSamples;
00092         QColor guiColor;
00093 
00102         bool paintBarcode(QString fileName = 0, int dpi = 72);
00107         void paintColorSample(QLabel *l, QColor c);
00110         bool codeEdit_check(const QString& s);
00111 
00112     protected slots:
00113         void bcComboChanged();
00114         void textCheck_changed();
00115         void guardCheck_changed();
00116         void includeCheck_stateChanged(int state);
00117         void includeCheckInText_stateChanged(int state);
00118         void bgColorButton_pressed();
00119         void lnColorButton_pressed();
00120         void txtColorButton_pressed();
00121         void codeEdit_textChanged(const QString& s);
00122         void resetButton_clicked();
00123         void okButton_pressed();
00124         void cancelButton_pressed();
00125 };
00126 
00127 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.