~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to libs/koreport/renderer/scripting/krscriptimage.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Kexi Report Plugin
3
 
 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Lesser General Public
7
 
 * License as published by the Free Software Foundation; either
8
 
 * version 2.1 of the License, or (at your option) any later version.
9
 
 *
10
 
 * This library is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
 
 * Lesser General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Lesser General Public
16
 
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
#ifndef SCRIPTINGKRSCRIPTIMAGE_H
19
 
#define SCRIPTINGKRSCRIPTIMAGE_H
20
 
 
21
 
#include <QObject>
22
 
#include <QPointF>
23
 
#include <QSizeF>
24
 
 
25
 
class KRImageData;
26
 
 
27
 
namespace Scripting
28
 
{
29
 
 
30
 
/**
31
 
 @author Adam Pigg <adam@piggz.co.uk>
32
 
*/
33
 
class Image : public QObject
34
 
{
35
 
    Q_OBJECT
36
 
public:
37
 
    Image(KRImageData *);
38
 
 
39
 
    ~Image();
40
 
public slots:
41
 
 
42
 
 
43
 
    /**
44
 
    * Get the position of the barcode
45
 
    * @return position in points
46
 
     */
47
 
    QPointF position();
48
 
 
49
 
 
50
 
    /**
51
 
     * Sets the position of the barcode in points
52
 
     * @param Position
53
 
     */
54
 
    void setPosition(const QPointF&);
55
 
 
56
 
    /**
57
 
     * Get the size of the barcode
58
 
     * @return size in points
59
 
     */
60
 
    QSizeF size();
61
 
 
62
 
    /**
63
 
     * Set the size of the barcode in points
64
 
     * @param Size
65
 
     */
66
 
    void setSize(const QSizeF&);
67
 
 
68
 
    /**
69
 
     * Get the resize mode for the image
70
 
     * @return resizeMode Clip or Stretch
71
 
     */
72
 
    QString resizeMode();
73
 
 
74
 
    /**
75
 
     * Sets the resize mode for the image
76
 
     * @param ResizeMode "Stretch" or "Clip" default is to clip
77
 
     */
78
 
    void setResizeMode(const QString &);
79
 
 
80
 
    /**
81
 
     * Sets the data for the static image
82
 
     * the data should be base64 encoded
83
 
     * @param RawImageData
84
 
     */
85
 
    void setInlineImage(const QByteArray&);
86
 
 
87
 
    /**
88
 
     * Get the data from a file (expected to be an image)
89
 
     * the returned data will be base64 encoded
90
 
     * @param Path location of file
91
 
     * @return File data enoded in base64
92
 
     */
93
 
    void loadFromFile(const QVariant &);
94
 
private:
95
 
    KRImageData *m_image;
96
 
 
97
 
};
98
 
 
99
 
}
100
 
 
101
 
#endif