OSDN Git Service

It's 2011 now.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / imageviewer / imageviewerfactory.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 ** Copyright (c) 2010 Denis Mingulov.
7 **
8 ** Contact: Nokia Corporation (qt-info@nokia.com)
9 **
10 ** No Commercial Usage
11 **
12 ** This file contains pre-release code and may not be distributed.
13 ** You may use this file in accordance with the terms and conditions
14 ** contained in the Technology Preview License Agreement accompanying
15 ** this package.
16 **
17 ** GNU Lesser General Public License Usage
18 **
19 ** Alternatively, this file may be used under the terms of the GNU Lesser
20 ** General Public License version 2.1 as published by the Free Software
21 ** Foundation and appearing in the file LICENSE.LGPL included in the
22 ** packaging of this file.  Please review the following information to
23 ** ensure the GNU Lesser General Public License version 2.1 requirements
24 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 **
26 ** In addition, as a special exception, Nokia gives you certain additional
27 ** rights.  These rights are described in the Nokia Qt LGPL Exception
28 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 **
30 ** If you have questions regarding the use of this file, please contact
31 ** Nokia at qt-info@nokia.com.
32 **
33 **************************************************************************/
34
35 #ifndef IMAGEVIEWERFACTORY_H
36 #define IMAGEVIEWERFACTORY_H
37
38 #include <coreplugin/editormanager/ieditorfactory.h>
39 #include <coreplugin/editormanager/ieditor.h>
40 #include <coreplugin/ifile.h>
41
42 #include <QtCore/QScopedPointer>
43
44 namespace ImageViewer {
45 namespace Internal {
46
47 class ImageViewerFactory : public Core::IEditorFactory
48 {
49     Q_OBJECT
50 public:
51     explicit ImageViewerFactory(QObject *parent = 0);
52     ~ImageViewerFactory();
53
54     Core::IEditor *createEditor(QWidget *parent);
55
56     QStringList mimeTypes() const;
57
58     QString id() const;
59     QString displayName() const;
60
61     Core::IFile *open(const QString &fileName);
62
63     void extensionsInitialized();
64
65 private:
66     QScopedPointer<struct ImageViewerFactoryPrivate> d_ptr;
67 };
68
69 } // namespace Internal
70 } // namespace ImageViewer
71
72 #endif // IMAGEVIEWERFACTORY_H