fixed: 212882 - Account setup finished view label font size is not proper
[accounts-sso:libaccounts-ui.git] / lib / AccountsUI / account-setup-finished-widget.cpp
1 /*
2  * This file is part of accounts-ui
3  *
4  * Copyright (C) 2009-2010 Nokia Corporation.
5  *
6  * Contact: Alberto Mardegan <alberto.mardegan@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * version 2.1 as published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  */
22
23 #include "account-setup-finished-widget.h"
24
25 #include <MLayout>
26 #include <MLinearLayoutPolicy>
27 #include <MButton>
28 #include <MLabel>
29 #include <MLibrary>
30 #include <MWidgetCreator>
31 M_LIBRARY
32
33 M_REGISTER_WIDGET_NO_CREATE(AccountSetupFinishedWidget)
34
35 AccountSetupFinishedWidget::AccountSetupFinishedWidget(const QString &providerName,
36                                                        QGraphicsItem *parent)
37     :MStylableWidget(parent)
38 {
39     MLayout *layout = new MLayout;
40     MLinearLayoutPolicy *policy = new MLinearLayoutPolicy(layout, Qt::Vertical);
41
42     // %"Success"
43     MLabel *successLabel = new MLabel(qtTrId("qtn_acc_success"));
44     successLabel->setStyleName("SuccessLabel");
45     successLabel->setAlignment(Qt::AlignCenter);
46
47     // %"Your %1 account is connected!"
48     MLabel *firstDescLabel = new MLabel(qtTrId("qtn_acc_account_connected").arg(providerName));
49     firstDescLabel->setStyleName("FirstDescLabel");
50     firstDescLabel->setAlignment(Qt::AlignCenter);
51
52     // %"Fetching your data"
53     MLabel *secondDescLabel = new MLabel(qtTrId("qtn_acc_fetching_your_data"));
54     secondDescLabel->setStyleName("SecondDescLabel");
55     secondDescLabel->setAlignment(Qt::AlignCenter);
56
57     policy->addItem(successLabel, Qt::AlignCenter);
58     policy->addItem(firstDescLabel, Qt::AlignCenter);
59     policy->addItem(secondDescLabel, Qt::AlignCenter);
60     setLayout(layout);
61 }
62
63