Added qmafw-gst-subtitles-applet package
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / applet / subtitleswidget.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (directui@nokia.com)
6 **
7 ** This file is part of meegotouch-controlpanelapplets.
8 **
9 ** If you have questions regarding the use of this file, please contact
10 ** Nokia at directui@nokia.com.
11 **
12 ** This library is free software; you can redistribute it and/or
13 ** modify it under the terms of the GNU Lesser General Public
14 ** License version 2.1 as published by the Free Software Foundation
15 ** and appearing in the file LICENSE.LGPL included in the packaging
16 ** of this file.
17 **
18 ****************************************************************************/
19 #ifndef SUBTITLESWIDGET_H
20 #define SUBTITLESWIDGET_H
21
22 #include <DcpStylableWidget>
23 #include <QSettings>
24
25 class MButton;
26 class MComboBox;
27 class MLabel;
28 class MLayout;
29 class MLinearLayoutPolicy;
30 class MContainer;
31
32 class SubtitlesWidget : public DcpStylableWidget
33 {
34     Q_OBJECT
35
36 public:
37     SubtitlesWidget (QGraphicsWidget *parent = 0);
38     ~SubtitlesWidget ();
39     bool back ();
40
41 protected:
42     void initWidget();
43
44 private slots:
45     void AutoloadSubtitlesToggled (bool enabled);
46     void RegularStyleButtonToggled (bool toggled);
47     void ItalicStyleButtonToggled (bool toggled);
48     void BoldStyleButtonToggled (bool toggled);
49     void SubtitlesFontSizeActivated (int index);
50     void SubtitlesEncodingActivated (int index);
51
52 private:
53     void addHeaderContainer ();
54     void addAutoloadSubtitlesContainer ();
55     void addSubtitlesFontStyleContainer ();
56     void addSubtitlesFontSizeContainer ();
57     void addSubtitlesEncodingContainer ();
58
59     void retranslateUi ();
60
61 private:
62     MLinearLayoutPolicy     *m_MainLayout;
63     MLabel                  *m_TitleLabel;
64     MButton                 *m_AutoloadSubtitlesSwitch;
65     MLabel                  *m_FontStyleLabel;
66     MButton                 *m_RegularStyleButton;
67     MButton                 *m_ItalicStyleButton;
68     MButton                 *m_BoldStyleButton;
69     MComboBox               *m_SubtitlesFontSizeCombo;
70     MComboBox               *m_SubtitlesEncodingCombo;
71     QSettings               *m_SubtitlesSettings;
72 };
73
74 #endif // SUBTITLESWIDGET_H