2
* OpenRPT report writer and rendering engine
3
* Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
4
* Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
20
#include "labelsizeinfo.h"
22
static LabelSizeInfo s_labels[] = {
23
//"LABEL_NAME","Paper Size","COLUMNS","ROWS","WIDTH","HEIGHT","STARTXOFFSET","STARTYOFFSET","HORIZONTALGAP","VERTICALGAP"
24
LabelSizeInfo("Avery 5263", "Letter", 2, 5, 400, 200, 25, 50, 0, 0),
25
LabelSizeInfo("Avery 5264", "Letter", 2, 3, 400, 333, 25, 75, 0, 0),
26
LabelSizeInfo("Avery 8460", "Letter", 3, 10, 262, 100, 32, 50, 0, 0),
27
LabelSizeInfo("CILS ALP1-9200-1", "Letter", 3, 7, 200, 100, 62, 62, 81, 50),
28
LabelSizeInfo() // Null Label Size
31
LabelSizeInfo LabelSizeInfo::find(const QString & name)
34
while (!s_labels[i].isNull() && s_labels[i].m_name != name)
39
QStringList LabelSizeInfo::labelNames()
42
for (int i = 0; !s_labels[i].isNull(); i++)
43
l.append(s_labels[i].m_name);
47
LabelSizeInfo::LabelSizeInfo(const QString & n, const QString & p, int c,
48
int r, int w, int h, int sx, int sy, int xg,
69
LabelSizeInfo::LabelSizeInfo()
86
LabelSizeInfo::~LabelSizeInfo()
90
QString LabelSizeInfo::name() const
95
QString LabelSizeInfo::paper() const
100
int LabelSizeInfo::columns() const
104
int LabelSizeInfo::rows() const
109
int LabelSizeInfo::width() const
114
int LabelSizeInfo::height() const
119
int LabelSizeInfo::startX() const
124
int LabelSizeInfo::startY() const
129
int LabelSizeInfo::xGap() const
134
int LabelSizeInfo::yGap() const
139
bool LabelSizeInfo::isNull() const