phonebookui/pbkcommonui/src/cntimportsview.cpp
changeset 37 fd64c38c277d
parent 31 2a11b5b00470
child 40 b46a585f6909
equal deleted inserted replaced
31:2a11b5b00470 37:fd64c38c277d
    24 #include <hbframebackground.h>
    24 #include <hbframebackground.h>
    25 #include <QStandardItemModel>
    25 #include <QStandardItemModel>
    26 #include <hbmainwindow.h>
    26 #include <hbmainwindow.h>
    27 #include <hblabel.h>
    27 #include <hblabel.h>
    28 #include <hblistview.h>
    28 #include <hblistview.h>
    29 #include <hbgroupbox.h>
    29 #include <QTimer>
    30 #include <QTimer.h>
       
    31 #include <hbnotificationdialog.h>
    30 #include <hbnotificationdialog.h>
    32 #include <hbmessagebox.h>
    31 #include <hbmessagebox.h>
    33 #include <hbprogressbar.h>
    32 #include <hbprogressbar.h>
    34 #include <QGraphicsLinearLayout>
    33 #include <QGraphicsLinearLayout>
    35 #include <hbframebackground.h>
    34 #include <hbframebackground.h>
    91 /*!
    90 /*!
    92 Activates a previous view
    91 Activates a previous view
    93 */
    92 */
    94 void CntImportsView::showPreviousView()
    93 void CntImportsView::showPreviousView()
    95 {
    94 {
    96   CntViewParameters args;
    95     CntViewParameters args;
    97   mViewManager->back(args);
    96     mViewManager->back(args);
    98 }
    97 }
    99 
    98 
   100 /*
    99 /*
   101 Activates a default view
   100 Activates a default view
   102 */
   101 */
   443 }
   442 }
   444 
   443 
   445 void CntImportsView::showWaitNote()
   444 void CntImportsView::showWaitNote()
   446 {
   445 {
   447     mImportSimPopup = new HbDialog();    
   446     mImportSimPopup = new HbDialog();    
   448     mImportSimPopup->setDismissPolicy(HbDialog::NoDismiss);
   447     mImportSimPopup->setDismissPolicy(HbPopup::NoDismiss);
   449     mImportSimPopup->setTimeout(0);
   448     mImportSimPopup->setTimeout(HbPopup::NoTimeout);
   450     mImportSimPopup->setBackgroundFaded(true);
   449     mImportSimPopup->setBackgroundFaded(true);
   451     mImportSimPopup->setAttribute(Qt::WA_DeleteOnClose, true);
   450     mImportSimPopup->setAttribute(Qt::WA_DeleteOnClose, true);
   452     
   451     
   453     HbGroupBox *groupBox = new HbGroupBox;
   452     HbLabel *headingLabel = new HbLabel(mImportSimPopup);
   454     groupBox->setHeading(hbTrId("txt_phob_title_import_contacts")); 
   453     headingLabel->setPlainText(hbTrId("txt_phob_title_import_contacts")); 
   455     mImportSimPopup->setHeadingWidget(groupBox);
   454     mImportSimPopup->setHeadingWidget(headingLabel);
   456     
   455     
   457     QGraphicsLinearLayout *containerLayout = new QGraphicsLinearLayout(Qt::Vertical);
   456     QGraphicsLinearLayout *containerLayout = new QGraphicsLinearLayout(Qt::Vertical);
   458     containerLayout->setContentsMargins(0, 0, 0, 0);
   457     containerLayout->setContentsMargins(0, 0, 0, 0);
   459     containerLayout->setSpacing(10);
   458     containerLayout->setSpacing(10);
   460     
   459     
   461     HbLabel *icon = new HbLabel();
   460     HbLabel *icon = new HbLabel(mImportSimPopup);
   462     icon->setIcon(HbIcon("qtg_large_sim"));  
   461     icon->setIcon(HbIcon("qtg_large_sim"));  
   463     
   462     
   464     HbLabel *simText= new HbLabel();
   463     HbLabel *simText= new HbLabel(mImportSimPopup);
   465     simText->setPlainText(hbTrId("txt_phob_info_importing_contacts_from_sim")); 
   464     simText->setPlainText(hbTrId("txt_phob_info_importing_contacts_from_sim")); 
   466     simText->setTextWrapping(Hb::TextWordWrap);
   465     simText->setTextWrapping(Hb::TextWordWrap);
   467     simText->setElideMode(Qt::ElideNone);
   466     simText->setElideMode(Qt::ElideNone);
   468     
   467     
   469     HbProgressBar *progressBar = new HbProgressBar;
   468     HbProgressBar *progressBar = new HbProgressBar(mImportSimPopup);
   470     progressBar->setRange(0,0); 
   469     progressBar->setRange(0,0); 
   471     
   470     
   472     HbPushButton *stopButton = new HbPushButton;
   471     HbPushButton *stopButton = new HbPushButton(mImportSimPopup);
   473     stopButton->setText(hbTrId("txt_phob_button_cancel"));
   472     stopButton->setText(hbTrId("txt_phob_button_cancel"));
   474     connect(stopButton, SIGNAL(clicked()), this, SLOT(stopSimImport()));
   473     connect(stopButton, SIGNAL(clicked()), this, SLOT(stopSimImport()));
   475     
   474     
   476     QGraphicsLinearLayout *containerLayout1 = new QGraphicsLinearLayout(Qt::Horizontal);
   475     QGraphicsLinearLayout *containerLayout1 = new QGraphicsLinearLayout(Qt::Horizontal);
   477     containerLayout1->addItem(icon);
   476     containerLayout1->addItem(icon);