diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
commit | 8805e6b17b1460f3316ccb28629e8ad78e4b9c2c (patch) | |
tree | dc9b702962ecf0060cc473397b9f80268c2456c9 /kbarcode/printersettings.h | |
download | kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.tar.gz kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.zip |
Added abandoned KDE3 version of kbarcode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1090667 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/printersettings.h')
-rw-r--r-- | kbarcode/printersettings.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/kbarcode/printersettings.h b/kbarcode/printersettings.h new file mode 100644 index 0000000..8083fcb --- /dev/null +++ b/kbarcode/printersettings.h @@ -0,0 +1,95 @@ +/*************************************************************************** + printersettings.h - description + ------------------- + begin : Don Jan 16 2003 + copyright : (C) 2003 by Dominik Seichter + email : domseichter@web.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PRINTERSETTINGS_H +#define PRINTERSETTINGS_H + +#include <qobject.h> +#include <qstring.h> +#include <kprinter.h> + +class KURL; + +typedef struct labelprinterdata { + int articleEvent1; + int articleEvent2; + int articleEvent3; + int articleEvent4; + + int groupEvent1; + int groupEvent2; + int groupEvent3; + int groupEvent4; + + bool useCustomNo; + + int quality; // printer quality; enum PrinterMode + bool border; + int format; // index of the page format + + QString comment; + QString separator; + QString quote; +}; + +typedef struct PageFormatInfo +{ + KPrinter::PageSize kprinter; + const char* shortName; // Short name + const char* descriptiveName; // Full name, which will be translated + double width; // in mm + double height; // in mm +}; + +class KPrinter; +class KComboBox; +class PrinterSettings: public QObject { + Q_OBJECT + public: + enum { High = QPrinter::HighResolution, Middle, VeryHigh }; + enum { TEC, ZEBRA, INTERMEC, EPCL }; + + PrinterSettings(); + ~PrinterSettings(); + + labelprinterdata* getData() const { + return lpdata; + } + + int getQuality() const; + + // Get the size of the current selected page format + double pageWidth() const; + double pageHeight() const; + + void insertPageFormat( KComboBox* combo ); + static PrinterSettings* getInstance(); + + // don't forget to delete printer + KPrinter* setupPrinter( const KURL & url, QWidget* parent, bool immediately = false, const QString & prn = QString::null ); + + public slots: + void loadConfig(); + void saveConfig(); + + private: + labelprinterdata* lpdata; + + static PrinterSettings* printerInstance; +}; + +#endif |