/* * vdr-tv-client: TV frontend for watching tv streams from the vdr server. * * Copyright (c) 2011, Mika Laitio. * * 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 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html * */ #include "QMLVDRClient.h" #include "QMLMainWindow.h" #include QMLMainWindow::QMLMainWindow() { qmlRegisterType("com.meego.vdrclient", 1, 0, "VDRClient"); view = new QDeclarativeView; context = view->rootContext(); context->setContextProperty("backgroundColor", QColor(Qt::yellow)); view->setSource(QUrl::fromLocalFile("/usr/share/vdr-tv-client/qml/ServerSelectionMain.qml")); view->show(); } QMLMainWindow::~QMLMainWindow() { delete(view); } QMLMainWindow* QMLMainWindow::instance() { static QMLMainWindow *_instance = NULL; qCritical() << "1"; if(_instance == NULL) { _instance = new QMLMainWindow; } qCritical() << "2"; return _instance; }