2013-01-29 21:11:45 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Marco Martin <mart@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VIEW_H
|
|
|
|
#define VIEW_H
|
|
|
|
|
|
|
|
#include <QtQuick/QQuickView>
|
|
|
|
|
|
|
|
|
2013-02-12 14:26:34 +01:00
|
|
|
#include "plasma/corona.h"
|
2013-02-04 19:47:35 +01:00
|
|
|
#include "plasma/containment.h"
|
2013-02-01 13:20:20 +01:00
|
|
|
|
2013-01-29 21:11:45 +01:00
|
|
|
|
|
|
|
class View : public QQuickView
|
|
|
|
{
|
2013-02-01 13:20:20 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
2013-01-29 21:11:45 +01:00
|
|
|
public:
|
2013-02-14 19:11:17 +01:00
|
|
|
explicit View(Plasma::Corona *corona, QWindow *parent = 0);
|
2013-01-29 21:11:45 +01:00
|
|
|
virtual ~View();
|
2013-02-01 13:20:20 +01:00
|
|
|
|
2013-02-14 21:14:04 +01:00
|
|
|
Plasma::Corona *corona() const;
|
|
|
|
|
2013-02-14 15:46:01 +01:00
|
|
|
//FIXME: not super nice, but we have to be sure qml assignment is done after window flags
|
2013-02-14 21:14:04 +01:00
|
|
|
virtual void init();
|
2013-02-14 15:46:01 +01:00
|
|
|
|
2013-02-04 19:47:35 +01:00
|
|
|
void setContainment(Plasma::Containment *cont);
|
|
|
|
Plasma::Containment *containment() const;
|
|
|
|
|
2013-02-21 17:49:52 +01:00
|
|
|
Plasma::Location location();
|
|
|
|
Plasma::FormFactor formFactor();
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void locationChanged(Plasma::Location location);
|
|
|
|
void formFactorChanged(Plasma::FormFactor formFactor);
|
|
|
|
|
2013-02-01 13:20:20 +01:00
|
|
|
private:
|
2013-02-12 14:26:34 +01:00
|
|
|
Plasma::Corona *m_corona;
|
2013-02-04 19:47:35 +01:00
|
|
|
QWeakPointer<Plasma::Containment> m_containment;
|
2013-01-29 21:11:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VIEW_H
|