-/****************************************************************************
-**
-** 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"
#include <MLibrary>
M_LIBRARY
-Q_EXPORT_PLUGIN2(subtitlesapplet, SubtitlesApplet)
+Q_EXPORT_PLUGIN2 (subtitlesapplet, SubtitlesApplet)
-SubtitlesApplet::SubtitlesApplet () :
- m_MainWidget (0)
+SubtitlesApplet::SubtitlesApplet () : m_MainWidget (0)
{
}
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<MAction*>