screengrabber/src/notifications.cpp
changeset 55 2d9cac8919d3
parent 53 819e59dfc032
child 56 392f7045e621
equal deleted inserted replaced
53:819e59dfc032 55:2d9cac8919d3
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <hbdevicemessagebox.h>
       
    19 #include <hblabel.h>
       
    20 #include <hbdeviceprogressdialog.h>
       
    21 
       
    22 #include "notifications.h"
       
    23 
       
    24 
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 
       
    28 void Notifications::imageCaptured()
       
    29 {
       
    30     HbDeviceMessageBox::information("Screen shot saved to Media Gallery");
       
    31 }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 
       
    35 void Notifications::about()
       
    36 {
       
    37     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
       
    38     messageBox->setText("Version 5.0.0 - March 10th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0.");
       
    39     HbLabel *header = new HbLabel("About Screen Grabber", messageBox);
       
    40     messageBox->setHeadingWidget(header);
       
    41     messageBox->setAttribute(Qt::WA_DeleteOnClose);
       
    42     messageBox->setTimeout(HbPopup::NoTimeout);
       
    43     messageBox->open();
       
    44 }
       
    45 
       
    46 // ---------------------------------------------------------------------------
       
    47 
       
    48 void Notifications::error(const QString& errorMessage)
       
    49 {
       
    50     HbDeviceMessageBox::warning(errorMessage);
       
    51 
       
    52 }
       
    53 
       
    54 // ---------------------------------------------------------------------------
       
    55 
       
    56 void Notifications::sequantialImagesCaptured(int amount){
       
    57     // Code below launches a global note
       
    58     QString text;
       
    59     text.setNum(amount, 10);
       
    60     text.append(" screen shots saved to Media Gallery");
       
    61     
       
    62     HbDeviceMessageBox::information(text);
       
    63  
       
    64 }
       
    65 
       
    66 // ---------------------------------------------------------------------------
       
    67 
       
    68 void Notifications::videoCaptured()
       
    69 {
       
    70     HbDeviceMessageBox::information("Video saved to Media Gallery");
       
    71 
       
    72 }
       
    73 
       
    74 // ---------------------------------------------------------------------------
       
    75 
       
    76 HbDeviceProgressDialog* Notifications::showProgressBar(int max)
       
    77 {
       
    78     HbDeviceProgressDialog *note = new HbDeviceProgressDialog(HbProgressDialog::ProgressDialog);
       
    79     note->setText("Saving...");
       
    80     note->setMaximum(max);
       
    81     note->show();
       
    82     return note;
       
    83 }
       
    84 
       
    85 // ---------------------------------------------------------------------------