Macro qtTrIdx() replaced by tr() and QT_TRANSLATE_NOOP()
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / applet / subtitlesapplet.cpp
1 /*
2  *  Subtitles control panel applet.
3  *  Copyright (C) 2011 Roman Moravcik
4  *
5  *  Based on Battery applet from meegotouch-controlpanelapplets
6  *  Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #include "subtitlesapplet.h"
24 #include "subtitleswidget.h"
25
26 #include "dcpsubtitles.h"
27
28 #include <dcpwidget.h>
29
30 #include <QtGui>
31 #include <MAction>
32
33 #include <MLibrary>
34 M_LIBRARY
35
36 Q_EXPORT_PLUGIN2 (subtitlesapplet, SubtitlesApplet)
37
38 SubtitlesApplet::SubtitlesApplet () : m_MainWidget (0)
39 {
40 }
41
42 SubtitlesApplet::~SubtitlesApplet ()
43 {
44 }
45
46 void SubtitlesApplet::init ()
47 {
48 }
49
50 DcpStylableWidget *
51 SubtitlesApplet::constructStylableWidget (int widgetId)
52 {
53     Q_UNUSED (widgetId);
54
55     if (m_MainWidget == NULL)
56         m_MainWidget = new SubtitlesWidget ();
57
58     return m_MainWidget;
59 }
60
61 QString SubtitlesApplet::title () const
62 {
63     return tr ("Subtitles");
64 }
65
66 QVector<MAction*>
67 SubtitlesApplet::viewMenuItems ()
68 {
69     QVector<MAction*> vector;
70
71     return vector;
72 }
73
74 DcpBrief*
75 SubtitlesApplet::constructBrief (int partId)
76 {
77     Q_UNUSED (partId);
78     return 0;
79 }