X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=qmafw-gst-subtitles-renderer%2Fapplet%2Fsubtitlesapplet.cpp;fp=qmafw-gst-subtitles-renderer%2Fapplet%2Fsubtitlesapplet.cpp;h=bcbedf0ef520598a9e97981e0f198856ac24131e;hb=5d196e4faf0a64d6d218a6b1b2aae1be8cafbc3f;hp=0000000000000000000000000000000000000000;hpb=cb58eb69968e3d124620470dfb1769958239fbb7;p=mafwsubrenderer diff --git a/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp b/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp new file mode 100644 index 0000000..bcbedf0 --- /dev/null +++ b/qmafw-gst-subtitles-renderer/applet/subtitlesapplet.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** 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. +** +****************************************************************************/ +#include "subtitlesapplet.h" +#include "subtitleswidget.h" + +#include "dcpsubtitles.h" + +#include + +#include +#include + +#include +M_LIBRARY + +Q_EXPORT_PLUGIN2(subtitlesapplet, SubtitlesApplet) + +SubtitlesApplet::SubtitlesApplet () : + m_MainWidget (0) +{ +} + +SubtitlesApplet::~SubtitlesApplet () +{ +} + +void SubtitlesApplet::init () +{ +} + +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 +{ + return qtTrId ("Subtitles"); +} + +QVector +SubtitlesApplet::viewMenuItems () +{ + QVector vector; + + return vector; +} + +DcpBrief* +SubtitlesApplet::constructBrief (int partId) +{ + Q_UNUSED (partId); + return 0; +}