void AccountSetupPage::createContent() { MApplicationPage::createContent(); setContentsMargins(0, 0, 0, 0); setPannable(true); //% "Mail" setTitle(qtTrId("xx_page_title")); MLayout *layout = new MLayout(centralWidget()); MLinearLayoutPolicy *policy = new MLinearLayoutPolicy(layout, Qt::Vertical); //% "New mail account" creatLabel (policy, ("<b>" + qtTrId("xx_new_mail_account") + "<b>"), true); //% "We need to take some details to setup your account." creatLabel (policy, qtTrId("xx_need_account_detail"), true); // Prompt the user for name //% "What's your name?" creatLabel(policy, qtTrId("xx_enter_your_name")); m_username = new MTextEdit(MTextEditModel::SingleLine, "", this); m_username->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); policy->addItem(m_username); policy->setItemSpacing(policy->indexOf(m_username), 5); // Prompt the user for email address //% "Email address" creatLabel (policy, qtTrId("xx_email_address")); m_emailAddress = new MTextEdit(MTextEditModel::SingleLine, "", this); m_emailAddress->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); policy->addItem(m_emailAddress); policy->setItemSpacing(policy->indexOf(m_emailAddress), 5); // Prompt the user for password //% "Password" creatLabel(policy, qtTrId("xx_password")); m_password = new MTextEdit(MTextEditModel::SingleLine, "", this); m_password->setEchoMode(MTextEditModel::Password); m_password->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); policy->addItem(m_password); policy->setItemSpacing(policy->indexOf(m_password), 5); // Setup button //% "Setup account" MButton *button = new MButton(qtTrId("xx_setup_account_button_label"), this); button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); connect(button, SIGNAL(clicked(bool)), this, SLOT(setupAccount())); policy->addItem(button); policy->addStretch(); // Settings menu //% "Settings" MAction *action = new MAction(qtTrId("xx_settings_actions"), this); action->setLocation(MAction::ApplicationMenuLocation); connect(action, SIGNAL(triggered(bool)), this, SIGNAL(emailSettingsTriggered())); addAction(action); }