You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.3 KiB
C

#ifndef RECEIPTSETTINGS_H
#define RECEIPTSETTINGS_H
#include <QObject>
#include <enums.h>
class ShopSettings : public QObject
{
Q_PROPERTY(QString output READ output WRITE setOutput)
Q_PROPERTY(int lettersPerLine READ lettersPerLine WRITE setLettersPerLine)
Q_PROPERTY(QString byMessage READ byMessage WRITE setByMessage)
Q_PROPERTY(bool eetActive READ eetActive WRITE setEetActive)
Q_PROPERTY(QString eetShopId READ eetShopId WRITE setEetShopId)
Q_PROPERTY(QString eetRegisterId READ eetRegisterId WRITE setEetRegisterId)
Q_PROPERTY(int eetMode READ eetMode WRITE setEetMode)
Q_PROPERTY(QString eetCertificate READ eetCertificate WRITE setEetCertificate)
Q_PROPERTY(QString eetKeyPassword READ eetKeyPassword WRITE setEetKeyPassword)
Q_PROPERTY(bool eetTest READ eetTest WRITE setEetTest)
Q_PROPERTY(bool eetPlayground READ eetPlayground WRITE setEetPlayground)
Q_PROPERTY(int favBtnCols READ favBtnCols WRITE setFavBtnCols)
Q_PROPERTY(int favBtnRows READ favBtnRows WRITE setFavBtnRows)
Q_PROPERTY(int favBtnSize READ favBtnSize WRITE setFavBtnSize)
Q_PROPERTY(Enums::Rounding rounding READ rounding WRITE setRounding)
Q_PROPERTY(int decimalPlaces READ decimalPlaces WRITE setDecimalPlaces)
Q_PROPERTY(QString roundingItem READ roundingItem WRITE setRoundingItem)
Q_OBJECT
public:
enum CODEPAGE
{
ASCII
};
explicit ShopSettings(QObject *parent = 0);
QString output() const;
void setOutput(const QString &output);
CODEPAGE codepage() const;
void setCodepage(const CODEPAGE &codepage);
int lettersPerLine() const;
void setLettersPerLine(int lettersPerLine);
QString byMessage() const;
void setByMessage(const QString &byMessage);
bool eetActive() const;
void setEetActive(bool eetActive);
QString eetShopId() const;
void setEetShopId(const QString &eetShopId);
QString eetRegisterId() const;
void setEetRegisterId(const QString &eetRegisterId);
int eetMode() const;
void setEetMode(int eetMode);
QString eetCertificate() const;
void setEetCertificate(const QString &eetCertificate);
QString eetKeyPassword() const;
void setEetKeyPassword(const QString &eetKeyPassword);
bool eetTest() const;
void setEetTest(bool eetTest);
bool eetPlayground() const;
void setEetPlayground(bool eetPlayground);
int favBtnCols() const;
void setFavBtnCols(int favBtnCols);
int favBtnRows() const;
void setFavBtnRows(int favBtnRows);
int favBtnSize() const;
void setFavBtnSize(int favBtnSize);
Enums::Rounding rounding() const;
void setRounding(const Enums::Rounding &rounding);
int decimalPlaces() const;
void setDecimalPlaces(int decimalPlaces);
QString roundingItem() const;
void setRoundingItem(const QString &roundingItem);
private:
QString m_output;
CODEPAGE m_codepage;
int m_lettersPerLine;
QString m_byMessage;
bool m_eetActive;
QString m_eetShopId;
QString m_eetRegisterId;
int m_eetMode;
QString m_eetCertificate;
QString m_eetKeyPassword;
bool m_eetTest;
bool m_eetPlayground;
int m_favBtnCols;
int m_favBtnRows;
int m_favBtnSize;
Enums::Rounding m_rounding;
int m_decimalPlaces;
QString m_roundingItem;
};
typedef QSharedPointer<ShopSettings> ShopSettingsPtr;
#endif // RECEIPTSETTINGS_H