# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276252191 -10800 # Node ID 446dc0e90e84b19fff9f60d4133841929d46533d # Parent 1c5fe9af5d3992bb493303559f39ef055e6dec40 Revision: 201021 Kit: 2010123 diff -r 1c5fe9af5d39 -r 446dc0e90e84 ftuapplication/inc/ftufirsttimeuse.h --- a/ftuapplication/inc/ftufirsttimeuse.h Thu May 27 12:45:45 2010 +0300 +++ b/ftuapplication/inc/ftufirsttimeuse.h Fri Jun 11 13:29:51 2010 +0300 @@ -26,7 +26,6 @@ FTU_TEST_CLASS(FtuFirstTimeUseTest) class QStateMachine; -class XQSettingsManager; /** * @ingroup group_ftuapplication @@ -122,8 +121,6 @@ */ QStateMachine* mRuntime; - XQSettingsManager* mSettingsManager; - FTU_TEST_FRIEND_CLASS(FtuFirstTimeUseTest) }; diff -r 1c5fe9af5d39 -r 446dc0e90e84 ftuapplication/src/ftufirsttimeuse.cpp --- a/ftuapplication/src/ftufirsttimeuse.cpp Thu May 27 12:45:45 2010 +0300 +++ b/ftuapplication/src/ftufirsttimeuse.cpp Fri Jun 11 13:29:51 2010 +0300 @@ -26,8 +26,6 @@ #include #include -#include "xqsettingskey.h" -#include "xqpublishandsubscribeutils.h" QTM_USE_NAMESPACE @@ -39,8 +37,6 @@ // -#include -#include #include FtuFirstTimeUse::FtuFirstTimeUse(QObject* aParent) : @@ -75,13 +71,6 @@ FTUTEST_FUNC_EXIT("FTU::FtuFirstTimeUse::FtuFirstTimeUse"); - const quint32 KDefaultKey = 0x00000001; - const qint32 KFtuUidProperty = {0x20026F95}; //SID of FirstTimeUseApplication - - mSettingsManager = new XQSettingsManager(this); - XQPublishAndSubscribeUtils utils(*mSettingsManager); - XQPublishAndSubscribeSettingsKey pAndSKey(KFtuUidProperty, KDefaultKey); - bool err = utils.defineProperty(pAndSKey, XQSettingsManager::TypeInt); } // --------------------------------------------------------------------------- diff -r 1c5fe9af5d39 -r 446dc0e90e84 stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h --- a/stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h Thu May 27 12:45:45 2010 +0300 +++ b/stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h Fri Jun 11 13:29:51 2010 +0300 @@ -49,13 +49,6 @@ class FtuWizardActivatedState : public QState { Q_OBJECT -public: - /* - * The plugin's display mode enumeration. - * FullScreen means menustrip is not shown. - * PartialScreen means menustrip is shown. - */ - enum PluginDisplayMode{FullScreen, PartialScreen}; public: @@ -101,12 +94,6 @@ HbMainWindow* mainWindow(); /** - * Creates the menustrip. - * @since S60 ?S60_version. - */ - void constructGrid(); - - /** * Connects signals and slots for active wizard. * @since S60 ?S60_version. */ @@ -128,21 +115,17 @@ void handleBackEvent(); /** + * Signalled when plugin emits wizardDeactivated signal. + * @since S60 ?S60_version. + */ + void handleGotoToC(); + + /** * @copydoc FtuWizard::onViewChanged */ void changeWizardView(FtuWizard *caller, QGraphicsWidget* viewWidget); /** - * @copydoc FtuWizard::fullScreenModeRequested - */ - void enableFullScreenMode(FtuWizard *caller); - - /** - * @copydoc FtuWizard::partialScreenModeRequested - */ - void enablePartialScreenMode(FtuWizard *caller); - - /** * @copydoc FtuWizard::onInfoTextUpdated */ void updateInfoText(FtuWizard *caller, QString text); @@ -208,11 +191,6 @@ HbAction* mBackAction; /** - * The menustrip component. - */ - HbGridView* mMenustrip; - - /** * Plugin's previously activated view. */ QGraphicsWidget* mPreviousView; @@ -222,10 +200,6 @@ */ QGraphicsWidget* mCurrentView; - /** - * The Plugin's display mode. - */ - PluginDisplayMode mPluginDisplayMode; FTU_TEST_FRIEND_CLASS(FtuStateProviderTest) }; diff -r 1c5fe9af5d39 -r 446dc0e90e84 stateproviders/ftustateprovider/resources/ftustateprovider.docml --- a/stateproviders/ftustateprovider/resources/ftustateprovider.docml Thu May 27 12:45:45 2010 +0300 +++ b/stateproviders/ftustateprovider/resources/ftustateprovider.docml Fri Jun 11 13:29:51 2010 +0300 @@ -1,19 +1,19 @@ - + - + - + - + - + - - + + @@ -26,35 +26,29 @@ - - - - - + - + - - - - - - - + + - + - + - + + + + diff -r 1c5fe9af5d39 -r 446dc0e90e84 stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp --- a/stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp Thu May 27 12:45:45 2010 +0300 +++ b/stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp Fri Jun 11 13:29:51 2010 +0300 @@ -36,7 +36,6 @@ #include #include -const int gridRowCount = 1; const char *FTUSTATEPROVIDER_DOCML2 = ":/xml/ftustateprovider.docml"; const char *WIZARD_VIEW = "wizardView"; @@ -67,10 +66,8 @@ mPluginTitleLabel(NULL), mWizardStackedWidget(NULL), mBackAction(NULL), - mMenustrip(NULL), mPreviousView(NULL), - mCurrentView(NULL), - mPluginDisplayMode(PartialScreen) + mCurrentView(NULL) { mMainWindow = hbInstance->allMainWindows().at(0); mDocumentLoader = new HbDocumentLoader(); @@ -123,13 +120,6 @@ mActiveWizard = content()->wizard(activeIndex); mPluginView->setNavigationAction(mBackAction); - // Make menustrip for testing purposes. - if(!mMenustrip) - { - constructGrid(); - } - mMenustrip->setVisible(true); - connect(mBackAction, SIGNAL(triggered()), this, SLOT(handleBackEvent())); @@ -152,22 +142,21 @@ QState::onExit(event); mMainWindow->currentView()->takeMenu(); disconnect(mBackAction, SIGNAL(triggered()), - this, SLOT(handleBackEvent())); + this, SLOT(handleBackEvent())); + + + disconnect(mActiveWizard, SIGNAL(wizardDeactivated(FtuWizard *)), + this, SLOT(handleGotoToC())); disconnect(mActiveWizard, SIGNAL(viewChanged(FtuWizard *, QGraphicsWidget* )), this, SLOT(changeWizardView(FtuWizard*, QGraphicsWidget*))); - disconnect(mActiveWizard, SIGNAL(fullScreenModeRequested(FtuWizard *)), - this, SLOT(enableFullScreenMode(FtuWizard*))); - - disconnect(mActiveWizard, SIGNAL(partialScreenModeRequested(FtuWizard * )), - this, SLOT(enablePartialScreenMode(FtuWizard*))); disconnect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )), this, SLOT(updateInfoText(FtuWizard *, QString))); - //disconnect from the existing existing wizard's updateMainMenu signal + //disconnect from the existing wizard's updateMainMenu signal disconnect(mActiveWizard,SIGNAL(updateMainMenu(FtuWizard *, HbMenu * )), this,SLOT(updateMainMenu(FtuWizard *, HbMenu * ))); } @@ -179,16 +168,13 @@ void FtuWizardActivatedState::setActiveWizardConnections() { // first disconnect possible old connections with active wizard + disconnect(mActiveWizard, SIGNAL(wizardDeactivated(FtuWizard *)), + this, SLOT(handleGotoToC())); + disconnect(mActiveWizard, SIGNAL(viewChanged(FtuWizard *, QGraphicsWidget* )), this, SLOT(changeWizardView(FtuWizard*, QGraphicsWidget*))); - disconnect(mActiveWizard, SIGNAL(fullScreenModeRequested(FtuWizard *)), - this, SLOT(enableFullScreenMode(FtuWizard*))); - - disconnect(mActiveWizard, SIGNAL(partialScreenModeRequested(FtuWizard * )), - this, SLOT(enablePartialScreenMode(FtuWizard*))); - disconnect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )), this, SLOT(updateInfoText(FtuWizard *, QString))); @@ -200,18 +186,15 @@ connect(mActiveWizard, SIGNAL(viewChanged(FtuWizard *, QGraphicsWidget* )), this, SLOT(changeWizardView(FtuWizard*, QGraphicsWidget*))); - connect(mActiveWizard, SIGNAL(fullScreenModeRequested(FtuWizard *)), - this, SLOT(enableFullScreenMode(FtuWizard*))); - - connect(mActiveWizard, SIGNAL(partialScreenModeRequested(FtuWizard * )), - this, SLOT(enablePartialScreenMode(FtuWizard*))); - connect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )), this, SLOT(updateInfoText(FtuWizard *, QString))); // connect to the updateMainMenu wizard signal connect(mActiveWizard,SIGNAL(updateMainMenu(FtuWizard *, HbMenu * )), this,SLOT(updateMainMenu(FtuWizard *, HbMenu * ))); + + connect(mActiveWizard, SIGNAL(wizardDeactivated(FtuWizard *)), + this, SLOT(handleGotoToC())); } // --------------------------------------------------------------------------- @@ -236,6 +219,10 @@ } } +void FtuWizardActivatedState::handleGotoToC() + { + emit backEventTriggered(); + } // --------------------------------------------------------------------------- // FtuWizardActivatedState::updateMainMenu @@ -281,45 +268,10 @@ // temp solution to skip edge indexes - start if (index == 0) { index++; } if (index == wizards.count()-1) { index--; } - // temp solution to skip edge indexes - end - - // create model index for active wizard - QModelIndex modelIndex = mMenustrip->model()->index(index, 0); - // scroll to correct position in menustrip - HbAbstractItemView::ScrollHint hint = HbAbstractItemView::PositionAtCenter; - mMenustrip->scrollTo(modelIndex, hint); } } } -// --------------------------------------------------------------------------- -// FtuWizardActivatedState::enableFullScreenMode -// --------------------------------------------------------------------------- -// -void FtuWizardActivatedState::enableFullScreenMode(FtuWizard *caller) -{ - if(caller == mActiveWizard) - { - mPluginDisplayMode = FullScreen; - // Remove menustrip - mMenustrip->setVisible(false); - caller->resizeWizard(calculateWizardGeometry()); - } -} - -// --------------------------------------------------------------------------- -// FtuWizardActivatedState::enablePartialScreenMode -// --------------------------------------------------------------------------- -// -void FtuWizardActivatedState::enablePartialScreenMode(FtuWizard *caller) -{ - if(caller == mActiveWizard) - { - mPluginDisplayMode = PartialScreen; - mMenustrip->setVisible(true); - caller->resizeWizard(calculateWizardGeometry()); - } -} // --------------------------------------------------------------------------- // FtuWizardActivatedState::updateInfoText @@ -344,49 +296,6 @@ } // --------------------------------------------------------------------------- -// FtuWizardActivatedState::constructGrid -// --------------------------------------------------------------------------- -// -void FtuWizardActivatedState::constructGrid() -{ - // fetch grid view from docml - mMenustrip = qobject_cast(mDocumentLoader->findWidget(WIZARD_GRID_VIEW)); - // set row amount for grid - mMenustrip->setRowCount(gridRowCount); - - mMenustrip->setScrollDirections(Qt::Horizontal); - - FtuContentService* ftuContentService = content(); - // get wizards - QList wizards = ftuContentService->wizards(); - - QStandardItemModel* model = new QStandardItemModel(this); - - for(int i = 0 ; i < wizards.size() ; ++i) - { - // get wizard settings - const FtuWizardSetting& settings = wizards.at(i)->wizardSettings(); - QStandardItem* item = new QStandardItem(); - HbIcon icon(settings.mMenustripDefaultIcon.absoluteFilePath()); - -// item->setBackground(QBrush(Qt::lightGray)); - item->setData(icon, Qt::DecorationRole); - - QStringList data; - data << settings.mMenustripLabel; - - item->setData(QVariant(data), Qt::DisplayRole); - - model->appendRow(item); - } - // set above defined model for menustrip - mMenustrip->setModel(model); - - connect(mMenustrip, SIGNAL(activated(const QModelIndex)), - this, SLOT(activateWizard(const QModelIndex))); -} - -// --------------------------------------------------------------------------- // FtuWizardActivatedState::activateWizard // --------------------------------------------------------------------------- // @@ -425,16 +334,6 @@ mActiveWizard->activateWizard(); } } - - // temp solution to skip edge indexes - start - if (wizardIndex == 0) { wizardIndex++; } - if (wizardIndex == content()->wizards().count()-1) { wizardIndex--; } - QModelIndex modelIndex = mMenustrip->model()->index(wizardIndex, 0); - // temp solution to skip edge indexes - end - - HbAbstractItemView::ScrollHint hint = HbAbstractItemView::PositionAtCenter; - // scroll to correct position in menustrip - mMenustrip->scrollTo(modelIndex, hint); } } @@ -446,17 +345,7 @@ { QRectF widgetRect = mWizardStackedWidget->geometry(); QRectF pluginRect = mPluginView->geometry(); - if(mPluginDisplayMode == FullScreen) - { - pluginRect.setSize(QSizeF(widgetRect.width(), - (widgetRect.height() + - mMenustrip->geometry().height()))); - } - else - { - pluginRect.setSize(QSizeF(widgetRect.width(), - widgetRect.height())); - } - + pluginRect.setSize(QSizeF(widgetRect.width(), + widgetRect.height())); return pluginRect; } diff -r 1c5fe9af5d39 -r 446dc0e90e84 wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml --- a/wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml Thu May 27 12:45:45 2010 +0300 +++ b/wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml Fri Jun 11 13:29:51 2010 +0300 @@ -53,9 +53,9 @@ - 2 - ftudatetimewizard.manifest - dataimportftuwizard.manifest + 1 + dataimportftuwizard.manifest +