1
/* * This file is part of Maliit framework *
3
* Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: maliit-discuss@lists.maliit.org
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License version 2.1 as published by the Free Software Foundation
11
* and appearing in the file LICENSE.LGPL included in the packaging
15
#ifndef MALIIT_PLUGINS_ABSTRACTSURFACEFACTORY_H
16
#define MALIIT_PLUGINS_ABSTRACTSURFACEFACTORY_H
18
#include <maliit/plugins/abstractsurface.h>
25
/*! \ingroup pluginapi
26
* \brief The AbstractSurfaceFactory class is used to create AbstractSurface instances
28
class AbstractSurfaceFactory : public QObject
32
AbstractSurfaceFactory();
34
* \brief ~AbstractSurfaceFactory
36
virtual ~AbstractSurfaceFactory();
39
* \brief returns the available screen size in current screen orientation
40
* \return the size in current screen orientation
42
virtual QSize screenSize() const = 0;
45
* \brief returns if a surface with options can be created
46
* \param options the options the surface should have
47
* \return true if such a surface can be created
49
virtual bool supported(AbstractSurface::Options options) const = 0;
52
* \brief creates a new AbstractSurface instance with options and parent
53
* \param options the options the surface should have
54
* \param parent the parent of the new surface
55
* \return a new AbstractSurface
57
virtual QSharedPointer<AbstractSurface> create(AbstractSurface::Options options,
58
const QSharedPointer<AbstractSurface> &parent = QSharedPointer<AbstractSurface>()) = 0;
62
* \brief signaled when the screen size changed
63
* \param newSize the new screen size
65
void screenSizeChanged(const QSize &newSize);
68
} // namespace Plugins
71
#endif // MALIIT_PLUGINS_ABSTRACTSURFACEFACTORY_H