/* * Copyright (C) 2013 Canonical, Ltd. * * 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; version 3. * * 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, see . * * Authored by: Nick Dedekind */ #ifndef APPLICATION_ARGUMENTS_H #define APPLICATION_ARGUMENTS_H #include #include #include class ApplicationArguments : public QObject { Q_OBJECT public: // Not exposed to the app as setSize isn't invokable void setSize(const QSize &size) { m_size = size; } Q_INVOKABLE bool hasGeometry() const { return m_size.isValid(); } Q_INVOKABLE int width() const { return m_size.width(); } Q_INVOKABLE int height() const { return m_size.height(); } private: QSize m_size; }; #endif // APPLICATION_ARGUMENTS_H