widget/qt/nsPrintSettingsQt.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/qt/nsPrintSettingsQt.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,84 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsPrintSettingsQt_h_
    1.11 +#define nsPrintSettingsQt_h_
    1.12 +
    1.13 +#include <QSharedPointer>
    1.14 +#include "nsPrintSettingsImpl.h"
    1.15 +#define NS_PRINTSETTINGSQT_IID \
    1.16 +{0x5bc4c746, 0x8970, 0x43a3, {0xbf, 0xb1, 0x5d, 0xe1, 0x74, 0xaf, 0x7c, 0xea}}
    1.17 +
    1.18 +class QPrinter;
    1.19 +class nsPrintSettingsQt : public nsPrintSettings
    1.20 +{
    1.21 +public:
    1.22 +    NS_DECL_ISUPPORTS_INHERITED
    1.23 +        NS_DECLARE_STATIC_IID_ACCESSOR(NS_PRINTSETTINGSQT_IID)
    1.24 +
    1.25 +    nsPrintSettingsQt();
    1.26 +    virtual ~nsPrintSettingsQt();
    1.27 +
    1.28 +    NS_IMETHOD GetPrintRange(int16_t* aPrintRange);
    1.29 +    NS_IMETHOD SetPrintRange(int16_t aPrintRange);
    1.30 +
    1.31 +    NS_IMETHOD GetStartPageRange(int32_t* aStartPageRange);
    1.32 +    NS_IMETHOD SetStartPageRange(int32_t aStartPageRange);
    1.33 +    NS_IMETHOD GetEndPageRange(int32_t* aEndPageRange);
    1.34 +    NS_IMETHOD SetEndPageRange(int32_t aEndPageRange);
    1.35 +
    1.36 +    NS_IMETHOD GetPrintReversed(bool* aPrintReversed);
    1.37 +    NS_IMETHOD SetPrintReversed(bool aPrintReversed);
    1.38 +
    1.39 +    NS_IMETHOD GetPrintInColor(bool* aPrintInColor);
    1.40 +    NS_IMETHOD SetPrintInColor(bool aPrintInColor);
    1.41 +
    1.42 +    NS_IMETHOD GetOrientation(int32_t* aOrientation);
    1.43 +    NS_IMETHOD SetOrientation(int32_t aOrientation);
    1.44 +
    1.45 +    NS_IMETHOD GetToFileName(char16_t** aToFileName);
    1.46 +    NS_IMETHOD SetToFileName(const char16_t* aToFileName);
    1.47 +
    1.48 +    NS_IMETHOD GetPrinterName(char16_t** aPrinter);
    1.49 +    NS_IMETHOD SetPrinterName(const char16_t* aPrinter);
    1.50 +
    1.51 +    NS_IMETHOD GetNumCopies(int32_t* aNumCopies);
    1.52 +    NS_IMETHOD SetNumCopies(int32_t aNumCopies);
    1.53 +
    1.54 +    NS_IMETHOD GetScaling(double* aScaling);
    1.55 +    NS_IMETHOD SetScaling(double aScaling);
    1.56 +
    1.57 +    NS_IMETHOD GetPaperName(char16_t** aPaperName);
    1.58 +    NS_IMETHOD SetPaperName(const char16_t* aPaperName);
    1.59 +
    1.60 +    NS_IMETHOD SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin);
    1.61 +    NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop);
    1.62 +    NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
    1.63 +    NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
    1.64 +    NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight);
    1.65 +
    1.66 +    NS_IMETHOD GetPaperWidth(double* aPaperWidth);
    1.67 +    NS_IMETHOD SetPaperWidth(double aPaperWidth);
    1.68 +
    1.69 +    NS_IMETHOD GetPaperHeight(double* aPaperHeight);
    1.70 +    NS_IMETHOD SetPaperHeight(double aPaperHeight);
    1.71 +
    1.72 +    NS_IMETHOD SetPaperSizeUnit(int16_t aPaperSizeUnit);
    1.73 +
    1.74 +    NS_IMETHOD GetEffectivePageSize(double* aWidth, double* aHeight);
    1.75 +
    1.76 +protected:
    1.77 +    nsPrintSettingsQt(const nsPrintSettingsQt& src);
    1.78 +    nsPrintSettingsQt& operator=(const nsPrintSettingsQt& rhs);
    1.79 +
    1.80 +    virtual nsresult _Clone(nsIPrintSettings** _retval);
    1.81 +    virtual nsresult _Assign(nsIPrintSettings* aPS);
    1.82 +
    1.83 +    QSharedPointer<QPrinter> mQPrinter;
    1.84 +};
    1.85 +
    1.86 +NS_DEFINE_STATIC_IID_ACCESSOR(nsPrintSettingsQt, NS_PRINTSETTINGSQT_IID)
    1.87 +#endif // nsPrintSettingsQt_h_

mercurial