~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/print/printoptionspage.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
Import upstream version 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2007 Aurélien Gâteau <agateau@kde.org>
28
28
 
29
29
// Local
30
30
 
31
 
namespace Gwenview {
32
 
 
 
31
namespace Gwenview
 
32
{
33
33
 
34
34
struct PrintOptionsPagePrivate;
35
 
class PrintOptionsPage : public QWidget {
36
 
        Q_OBJECT
 
35
class PrintOptionsPage : public QWidget
 
36
{
 
37
    Q_OBJECT
37
38
public:
38
 
        enum ScaleMode {
39
 
                NoScale,
40
 
                ScaleToPage,
41
 
                ScaleToCustomSize
42
 
        };
43
 
 
44
 
        // Order should match the content of the unit combbox in the ui file
45
 
        enum Unit {
46
 
                Millimeters,
47
 
                Centimeters,
48
 
                Inches
49
 
        };
50
 
 
51
 
        PrintOptionsPage(const QSize& imageSize);
52
 
        ~PrintOptionsPage();
53
 
 
54
 
        Qt::Alignment alignment() const;
55
 
        ScaleMode scaleMode() const;
56
 
        bool enlargeSmallerImages() const;
57
 
        Unit scaleUnit() const;
58
 
        double scaleWidth() const;
59
 
        double scaleHeight() const;
60
 
 
61
 
        void loadConfig();
62
 
        void saveConfig();
 
39
    enum ScaleMode {
 
40
        NoScale,
 
41
        ScaleToPage,
 
42
        ScaleToCustomSize
 
43
    };
 
44
 
 
45
    // Order should match the content of the unit combbox in the ui file
 
46
    enum Unit {
 
47
        Millimeters,
 
48
        Centimeters,
 
49
        Inches
 
50
    };
 
51
 
 
52
    PrintOptionsPage(const QSize& imageSize);
 
53
    ~PrintOptionsPage();
 
54
 
 
55
    Qt::Alignment alignment() const;
 
56
    ScaleMode scaleMode() const;
 
57
    bool enlargeSmallerImages() const;
 
58
    Unit scaleUnit() const;
 
59
    double scaleWidth() const;
 
60
    double scaleHeight() const;
 
61
 
 
62
    void loadConfig();
 
63
    void saveConfig();
63
64
 
64
65
private Q_SLOTS:
65
 
        void adjustWidthToRatio();
66
 
        void adjustHeightToRatio();
 
66
    void adjustWidthToRatio();
 
67
    void adjustHeightToRatio();
67
68
 
68
69
private:
69
 
        PrintOptionsPagePrivate* const d;
 
70
    PrintOptionsPagePrivate* const d;
70
71
};
71
72
 
72
 
 
73
73
} // namespace
74
74
 
75
75
#endif /* PRINTOPTIONSPAGE_H */