X-Git-Url: http://git.maemo.org/git/?p=mafwsubrenderer;a=blobdiff_plain;f=qmafw-gst-subtitles-renderer%2Fapplet%2Fsubtitlesapplet.cpp;h=44270af3cf18fbbc09d52a69683f1f7d08b36b24;hp=bcbedf0ef520598a9e97981e0f198856ac24131e;hb=8f2426d7afcee29df66dfdf59f2ea604d1803ffc;hpb=5d196e4faf0a64d6d218a6b1b2aae1be8cafbc3f diff --git a/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp b/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp index bcbedf0..44270af 100644 --- a/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp +++ b/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp @@ -1,21 +1,25 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (directui@nokia.com) -** -** This file is part of meegotouch-controlpanelapplets. -** -** If you have questions regarding the use of this file, please contact -** Nokia at directui@nokia.com. -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation -** and appearing in the file LICENSE.LGPL included in the packaging -** of this file. -** -****************************************************************************/ +/* + * Subtitles control panel applet. + * Copyright (C) 2011 Roman Moravcik + * + * Based on Battery applet from meegotouch-controlpanelapplets + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #include "subtitlesapplet.h" #include "subtitleswidget.h" @@ -29,10 +33,9 @@ #include M_LIBRARY -Q_EXPORT_PLUGIN2(subtitlesapplet, SubtitlesApplet) +Q_EXPORT_PLUGIN2 (subtitlesapplet, SubtitlesApplet) -SubtitlesApplet::SubtitlesApplet () : - m_MainWidget (0) +SubtitlesApplet::SubtitlesApplet () : m_MainWidget (0) { } @@ -48,20 +51,16 @@ DcpStylableWidget * SubtitlesApplet::constructStylableWidget (int widgetId) { Q_UNUSED (widgetId); - /* - * Please note that the m_MainWidget is a QPointer that will nullify itself - * when the widget is destroyed. Then we need to create a new one when we - * asked for it. - */ + if (m_MainWidget == NULL) m_MainWidget = new SubtitlesWidget (); return m_MainWidget; } -QString SubtitlesApplet::title() const +QString SubtitlesApplet::title () const { - return qtTrId ("Subtitles"); + return tr ("Subtitles"); } QVector