| Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #include "launcherbuttonprogressindicatorview.h" 00021 00022 LauncherButtonProgressIndicatorView::LauncherButtonProgressIndicatorView(LauncherButtonProgressIndicator *controller) 00023 : MSpinnerView(controller) 00024 { 00025 } 00026 00027 void LauncherButtonProgressIndicatorView::setupModel() 00028 { 00029 MSpinnerView::setupModel(); 00030 00031 // Set the default style mode 00032 updateStyleMode(); 00033 } 00034 00035 void LauncherButtonProgressIndicatorView::updateData(const QList<const char *>& modifications) 00036 { 00037 MSpinnerView::updateData(modifications); 00038 00039 const char *member; 00040 foreach(member, modifications) { 00041 if (member == LauncherButtonProgressIndicatorModel::IndicatorState) { 00042 updateStyleMode(); 00043 } 00044 } 00045 } 00046 00047 void LauncherButtonProgressIndicatorView::updateStyleMode() 00048 { 00049 switch(model()->indicatorState()) { 00050 case LauncherButtonModel::Installing: 00051 style().setModeInstalling(); 00052 break; 00053 case LauncherButtonModel::Downloading: 00054 style().setModeDownloading(); 00055 break; 00056 case LauncherButtonModel::Launching: 00057 style().setModeLaunching(); 00058 break; 00059 default: 00060 break; 00061 } 00062 applyStyle(); 00063 } 00064 00065 // bind controller widget and view widget together by registration macro 00066 M_REGISTER_VIEW_NEW(LauncherButtonProgressIndicatorView, LauncherButtonProgressIndicator)
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:20:42 Doxygen 1.7.1 |
MeeGo Touch |