qpictureformatplugin.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/image/qpictureformatplugin.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtGui module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qpictureformatplugin.h"-
35#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_PICTURE)-
36#include "qpicture.h"-
37-
38QT_BEGIN_NAMESPACE-
39-
40/*!-
41 \obsolete-
42-
43 \class QPictureFormatPlugin-
44 \brief The QPictureFormatPlugin class provides an abstract base-
45 for custom picture format plugins.-
46-
47 \ingroup plugins-
48 \inmodule QtGui-
49-
50 The picture format plugin is a simple plugin interface that makes-
51 it easy to create custom picture formats that can be used-
52 transparently by applications.-
53-
54 Writing an picture format plugin is achieved by subclassing this-
55 base class, reimplementing the pure virtual functions-
56 loadPicture(), savePicture(), and installIOHandler(), and-
57 exporting the class with the Q_PLUGIN_METADATA() macro.-
58-
59 The json file containing the metadata should contain one entry-
60 with the list of picture formats supported by the plugin:-
61-
62 \code-
63 { "Keys": [ "mypictureformat" ] }-
64 \endcode-
65-
66 \sa {How to Create Qt Plugins}-
67*/-
68-
69/*!-
70 \fn bool QPictureFormatPlugin::installIOHandler(const QString &format)-
71-
72 Installs a QPictureIO picture I/O handler for the picture format \a-
73 format. Returns \c true on success.-
74*/-
75-
76-
77/*!-
78 Constructs an picture format plugin with the given \a parent.-
79 This is invoked automatically by the moc generated code that exports the plugin.-
80*/-
81QPictureFormatPlugin::QPictureFormatPlugin(QObject *parent)-
82 : QObject(parent)-
83{-
84}
never executed: end of block
0
85-
86/*!-
87 Destroys the picture format plugin.-
88-
89 You never have to call this explicitly. Qt destroys a plugin-
90 automatically when it is no longer used.-
91*/-
92QPictureFormatPlugin::~QPictureFormatPlugin()-
93{-
94}-
95-
96-
97/*!-
98 Loads the picture stored in the file called \a fileName, with the-
99 given \a format, into *\a picture. Returns \c true on success;-
100 otherwise returns \c false.-
101-
102 \sa savePicture()-
103*/-
104bool QPictureFormatPlugin::loadPicture(const QString &format, const QString &fileName, QPicture *picture)-
105{-
106 Q_UNUSED(format)-
107 Q_UNUSED(fileName)-
108 Q_UNUSED(picture)-
109 return false;
never executed: return false;
0
110}-
111-
112/*!-
113 Saves the given \a picture into the file called \a fileName,-
114 using the specified \a format. Returns \c true on success; otherwise-
115 returns \c false.-
116-
117 \sa loadPicture()-
118*/-
119bool QPictureFormatPlugin::savePicture(const QString &format, const QString &fileName, const QPicture &picture)-
120{-
121 Q_UNUSED(format)-
122 Q_UNUSED(fileName)-
123 Q_UNUSED(picture)-
124 return false;
never executed: return false;
0
125}-
126-
127#endif // QT_NO_LIBRARY || QT_NO_PICTURE-
128-
129QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9