Subversion Repositories Scribus

Rev

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