| 1 | /* |
| 2 | * File: DecolationRules.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: May 10, 2014 |
| 6 | * |
| 7 | * Copyright (c) 2009-2014 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * This object represents the decolation rules for the Hercules Studio printer |
| 11 | * |
| 12 | * This program is free software: you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by |
| 14 | * the Free Software Foundation, either version 3 of the License, or |
| 15 | * (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | #ifndef DECOLATIONRULES_H |
| 28 | #define DECOLATIONRULES_H |
| 29 | |
| 30 | #include "Trigger.h" |
| 31 | |
| 32 | #include <QList> |
| 33 | #include <QList> |
| 34 | |
| 35 | typedef QList<Trigger> Triggers; |
| 36 | |
| 37 | struct Seperator |
| 38 | { |
| 39 | public: |
| 40 | int mPages; // number of consequtive pages which make a separator |
| 41 | Triggers mTriggers; // sum of triggers that make a separator page |
| 42 | }; |
| 43 | |
| 44 | struct AccountingField |
| 45 | { |
| 46 | QString mName; |
| 47 | int mLine; |
| 48 | int mColumn; |
| 49 | int mLength; |
| 50 | }; |
| 51 | |
| 52 | class AccountingFields |
| 53 | { |
| 54 | public: |
| 55 | void add(const AccountingField& fld) { mFields.push_back(fld);} |
| 56 | public: |
| 57 | QList<AccountingField> mFields; |
| 58 | }; |
| 59 | |
| 60 | |
| 61 | |
| 62 | class DecolationRules |
| 63 | { |
| 64 | public: |
| 65 | DecolationRules(); |
| 66 | |
| 67 | const QString& name(); |
| 68 | void setName(const QString &name); |
| 69 | void setFileNameTemplate(const QString & name); |
| 70 | QString filenameTemplate(); |
| 71 | |
| 72 | public: |
| 73 | Seperator mSeperator; |
| 74 | AccountingFields mAccounting; |
| 75 | QString mFileNameTemplate; |
| 76 | |
| 77 | private: |
| 78 | QString mName; |
| 79 | }; |
| 80 | |
| 81 | #endif // DECOLATIONRULES_H |