screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdocumentloader.cpp
changeset 69 87476091b3f5
parent 62 341166945d65
equal deleted inserted replaced
67:474929a40a0f 69:87476091b3f5
    19 
    19 
    20 #include "snsranalogclockwidget.h"
    20 #include "snsranalogclockwidget.h"
    21 #include "snsroledclockwidget.h"
    21 #include "snsroledclockwidget.h"
    22 #include "snsrlabel.h"
    22 #include "snsrlabel.h"
    23 #include "snsrindicatorwidget.h"
    23 #include "snsrindicatorwidget.h"
       
    24 #include "snsroledtimelabel.h"
    24 #include "snsrswipewidget.h"
    25 #include "snsrswipewidget.h"
    25 
    26 
    26 /*!
    27 /*!
    27     \class SnsrDocumentLoader
    28     \class SnsrDocumentLoader
    28     \ingroup group_snsrbigclockscreensaverplugin
    29     \ingroup group_snsrbigclockscreensaverplugin
    29     \brief Custom screensaver docml layout loader.
    30     \brief Custom screensaver docml layout loader.
    30 
    31 
    31     Used mainly to create the analog clock widget from docml.
    32     Used to create the widgets from docml.
    32  */
    33  */
    33 
    34 
    34 /*!
    35 /*!
    35     Creates the analog clock.
    36     Creates the requested widget.
    36     \param type Static type name.
    37     \param type Static type name.
    37     \param name Object name.
    38     \param name Object name.
    38     \retval Created object.
    39     \retval Created object.
    39  */
    40  */
    40 QObject *SnsrDocumentLoader::createObject(const QString &type, const QString &name)
    41 QObject *SnsrDocumentLoader::createObject(const QString &type, const QString &name)
    61         QObject *object = new SnsrIndicatorWidget();
    62         QObject *object = new SnsrIndicatorWidget();
    62         object->setObjectName(name);
    63         object->setObjectName(name);
    63         return object;
    64         return object;
    64     }
    65     }
    65 
    66 
       
    67     if (type == SnsrOledTimeLabel::staticMetaObject.className()) {
       
    68         QObject *object = new SnsrOledTimeLabel();
       
    69         object->setObjectName(name);
       
    70         return object;
       
    71     }
       
    72     
    66     /* Add swipeWidget implementation later on
    73     /* Add swipeWidget implementation later on
    67      
    74      
    68      if (type == SnsrSwipeWidget::staticMetaObject.className()) {
    75      if (type == SnsrSwipeWidget::staticMetaObject.className()) {
    69         QObject *object = new SnsrSwipeWidget();
    76         QObject *object = new SnsrSwipeWidget();
    70         object->setObjectName(name);
    77         object->setObjectName(name);