Back to index

scribus-ng  1.3.4.dfsg+svn20071115
barcode.cpp
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 #include "barcode.h"
00009 #include "barcode.moc"
00010 #include "barcodegenerator.h"
00011 
00012 Barcode::Barcode() : ScActionPlugin()
00013 {
00014        languageChange();
00015 }
00016 
00017 Barcode::~Barcode() {};
00018 
00019 void Barcode::languageChange()
00020 {
00021        m_actionInfo.name = "Barcode Generator";
00022        m_actionInfo.text = tr("&Barcode Generator...");
00023        m_actionInfo.menu = "Extras";
00024        m_actionInfo.enabledOnStartup = true;
00025 }
00026 
00027 const QString Barcode::fullTrName() const
00028 {
00029        return QObject::tr("Barcode Generator");
00030 }
00031 
00032 const ScActionPlugin::AboutData* Barcode::getAboutData() const
00033 {
00034        AboutData* about = new AboutData;
00035        Q_CHECK_PTR(about);
00036        about->authors = QString::fromUtf8("Terry Burton - <tez@terryburton.co.uk>, Petr Van\xc4\x9bk <petr@scribus.info>");
00037        about->shortDescription = tr("Scribus frontend for Pure Postscript Barcode Writer");
00038        about->description = "Barcode Writer in Pure Postscript is an award-winning open source barcode maker, as used by NASA, that facilitates the printing of all major barcode symbologies entirely within level 2 PostScript, ideal for variable data printing. The complete process of generating printed barcodes is performed entirely within the printer (or print system) so that it is no longer the responsibility of your application or a library. There is no need for any barcode fonts and the flexibility offered by direct PostScript means you can avoid re-implementing barcode generator code, or migrating to new libraries, whenever your project language needs change.\nhttp://www.terryburton.co.uk/barcodewriter/";
00039        about->version = "Backend: 2006-01-17";
00040        // about->releaseDate
00041        about->copyright = QString::fromUtf8("Backend: Copyright (c) 2005 Terry Burton - tez@terryburton.co.uk\nFrontend: Copyright (c) 2005 Petr Van\xc4\x9bk - petr@scribus.info");
00042        about->license = "Backend: MIT/X-Consortium, Frontend: GPL";
00043        return about;
00044 }
00045 
00046 void Barcode::deleteAboutData(const AboutData* about) const
00047 {
00048        Q_ASSERT(about);
00049        delete about;
00050 }
00051 
00052 bool Barcode::run(ScribusDoc*, QString /*target*/ )
00053 {
00054        BarcodeGenerator *bg = new BarcodeGenerator();
00055        Q_CHECK_PTR(bg);
00056        bg->exec();
00057        delete bg;
00058        return true;
00059 }
00060 
00061 int barcodegenerator_getPluginAPIVersion()
00062 {
00063        return PLUGIN_API_VERSION;
00064 }
00065 
00066 ScPlugin* barcodegenerator_getPlugin()
00067 {
00068        Barcode* plug = new Barcode();
00069        Q_CHECK_PTR(plug);
00070        return plug;
00071 }
00072 
00073 void barcodegenerator_freePlugin(ScPlugin* plugin)
00074 {
00075        Barcode* plug = dynamic_cast<Barcode*>(plugin);
00076        Q_ASSERT(plug);
00077        delete plug;
00078 }