Subversion Repositories Scribus

Rev

Rev 5120 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4460 subik 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
#include "barcode.h"
9
#include "barcodegenerator.h"
10
 
11
Barcode::Barcode() : ScActionPlugin()
12
{
13
        languageChange();
14
}
15
 
16
Barcode::~Barcode() {};
17
 
18
void Barcode::languageChange()
19
{
20
        m_actionInfo.name = "Barcode Generator";
21
        m_actionInfo.text = tr("&Barcode Generator...");
22
        m_actionInfo.menu = "Extras";
23
        m_actionInfo.enabledOnStartup = true;
24
}
25
 
26
const QString Barcode::fullTrName() const
27
{
28
        return QObject::tr("Barcode Generator");
29
}
30
 
31
const ScActionPlugin::AboutData* Barcode::getAboutData() const
32
{
33
        AboutData* about = new AboutData;
34
        Q_CHECK_PTR(about);
35
        about->authors = QString::fromUtf8("Terry Burton - <tez@terryburton.co.uk>, Petr Van\xc4\x9bk <petr@scribus.info>");
36
        about->shortDescription = tr("Scribus frontend for Pure Postscript Barcode Writer");
37
        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/";
38
        about->version = "Backend: 2006-01-17";
39
        // about->releaseDate
40
        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");
41
        about->license = "Backend: MIT/X-Consortium, Frontend: GPL";
42
        return about;
43
}
44
 
45
void Barcode::deleteAboutData(const AboutData* about) const
46
{
47
        Q_ASSERT(about);
48
        delete about;
49
}
50
 
51
bool Barcode::run(QString )//target)
52
{
53
        BarcodeGenerator *bg = new BarcodeGenerator();
54
        Q_CHECK_PTR(bg);
55
        bg->exec();
56
        delete bg;
57
        return true;
58
}
59
 
60
int barcodegenerator_getPluginAPIVersion()
61
{
62
        return PLUGIN_API_VERSION;
63
}
64
 
65
ScPlugin* barcodegenerator_getPlugin()
66
{
67
        Barcode* plug = new Barcode();
68
        Q_CHECK_PTR(plug);
69
        return plug;
70
}
71
 
72
void barcodegenerator_freePlugin(ScPlugin* plugin)
73
{
74
        Barcode* plug = dynamic_cast<Barcode*>(plugin);
75
        Q_ASSERT(plug);
76
        delete plug;
77
}