widget/qt/nsPrintSettingsQt.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:9bc2f464eb6d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef nsPrintSettingsQt_h_
8 #define nsPrintSettingsQt_h_
9
10 #include <QSharedPointer>
11 #include "nsPrintSettingsImpl.h"
12 #define NS_PRINTSETTINGSQT_IID \
13 {0x5bc4c746, 0x8970, 0x43a3, {0xbf, 0xb1, 0x5d, 0xe1, 0x74, 0xaf, 0x7c, 0xea}}
14
15 class QPrinter;
16 class nsPrintSettingsQt : public nsPrintSettings
17 {
18 public:
19 NS_DECL_ISUPPORTS_INHERITED
20 NS_DECLARE_STATIC_IID_ACCESSOR(NS_PRINTSETTINGSQT_IID)
21
22 nsPrintSettingsQt();
23 virtual ~nsPrintSettingsQt();
24
25 NS_IMETHOD GetPrintRange(int16_t* aPrintRange);
26 NS_IMETHOD SetPrintRange(int16_t aPrintRange);
27
28 NS_IMETHOD GetStartPageRange(int32_t* aStartPageRange);
29 NS_IMETHOD SetStartPageRange(int32_t aStartPageRange);
30 NS_IMETHOD GetEndPageRange(int32_t* aEndPageRange);
31 NS_IMETHOD SetEndPageRange(int32_t aEndPageRange);
32
33 NS_IMETHOD GetPrintReversed(bool* aPrintReversed);
34 NS_IMETHOD SetPrintReversed(bool aPrintReversed);
35
36 NS_IMETHOD GetPrintInColor(bool* aPrintInColor);
37 NS_IMETHOD SetPrintInColor(bool aPrintInColor);
38
39 NS_IMETHOD GetOrientation(int32_t* aOrientation);
40 NS_IMETHOD SetOrientation(int32_t aOrientation);
41
42 NS_IMETHOD GetToFileName(char16_t** aToFileName);
43 NS_IMETHOD SetToFileName(const char16_t* aToFileName);
44
45 NS_IMETHOD GetPrinterName(char16_t** aPrinter);
46 NS_IMETHOD SetPrinterName(const char16_t* aPrinter);
47
48 NS_IMETHOD GetNumCopies(int32_t* aNumCopies);
49 NS_IMETHOD SetNumCopies(int32_t aNumCopies);
50
51 NS_IMETHOD GetScaling(double* aScaling);
52 NS_IMETHOD SetScaling(double aScaling);
53
54 NS_IMETHOD GetPaperName(char16_t** aPaperName);
55 NS_IMETHOD SetPaperName(const char16_t* aPaperName);
56
57 NS_IMETHOD SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin);
58 NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop);
59 NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
60 NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
61 NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight);
62
63 NS_IMETHOD GetPaperWidth(double* aPaperWidth);
64 NS_IMETHOD SetPaperWidth(double aPaperWidth);
65
66 NS_IMETHOD GetPaperHeight(double* aPaperHeight);
67 NS_IMETHOD SetPaperHeight(double aPaperHeight);
68
69 NS_IMETHOD SetPaperSizeUnit(int16_t aPaperSizeUnit);
70
71 NS_IMETHOD GetEffectivePageSize(double* aWidth, double* aHeight);
72
73 protected:
74 nsPrintSettingsQt(const nsPrintSettingsQt& src);
75 nsPrintSettingsQt& operator=(const nsPrintSettingsQt& rhs);
76
77 virtual nsresult _Clone(nsIPrintSettings** _retval);
78 virtual nsresult _Assign(nsIPrintSettings* aPS);
79
80 QSharedPointer<QPrinter> mQPrinter;
81 };
82
83 NS_DEFINE_STATIC_IID_ACCESSOR(nsPrintSettingsQt, NS_PRINTSETTINGSQT_IID)
84 #endif // nsPrintSettingsQt_h_

mercurial