equal
deleted
inserted
replaced
39 |
39 |
40 #include "contactwidgeths.h" |
40 #include "contactwidgeths.h" |
41 #include "commlauncherwidget.h" |
41 #include "commlauncherwidget.h" |
42 #include "ihswidgetpreferenceservice.h" |
42 #include "ihswidgetpreferenceservice.h" |
43 |
43 |
|
44 const QString translationsPath = "/resource/qt/translations/"; |
|
45 const QString translationsFile = "contactwidgethsplugin"; |
|
46 |
44 const QString defaultAvatar = "qtg_large_avatar"; |
47 const QString defaultAvatar = "qtg_large_avatar"; |
45 const QString addContactAvatar = "qtg_small_add"; |
48 const QString addContactAvatar = "qtg_small_add"; |
46 const QString normalFrameName = "qtg_fr_hsshortcut_normal"; |
49 const QString normalFrameName = "qtg_fr_hsshortcut_normal"; |
47 const QString normalTextColor = "qtc_hs_list_item_title_normal"; |
50 const QString normalTextColor = "qtc_hs_list_item_title_normal"; |
48 const QString latchedFrameName = "qtg_fr_hsitems_latched"; |
51 const QString latchedFrameName = "qtg_fr_hsitems_latched"; |
77 mThumbnailPixmap(QPixmap()), |
80 mThumbnailPixmap(QPixmap()), |
78 mThumbnailInProgress(false), |
81 mThumbnailInProgress(false), |
79 mTranslator(0) |
82 mTranslator(0) |
80 { |
83 { |
81 // Localization file loading |
84 // Localization file loading |
82 mTranslator = new HbTranslator(); |
85 mTranslator = new HbTranslator(translationsPath, translationsFile); |
83 mTranslator->loadCommon(); |
86 mTranslator->loadCommon(); |
84 |
87 |
85 // UI creation done in onInitialize() |
88 // UI creation done in onInitialize() |
86 if (mainWindow()) { |
89 if (mainWindow()) { |
87 mMainWindow = mainWindow(); |
90 mMainWindow = mainWindow(); |
577 Called when the widget is hidden. |
580 Called when the widget is hidden. |
578 This method is needed. Otherwise the widget cannot be added to HS. |
581 This method is needed. Otherwise the widget cannot be added to HS. |
579 */ |
582 */ |
580 void ContactWidgetHs::onHide() |
583 void ContactWidgetHs::onHide() |
581 { |
584 { |
582 qDebug() << "ContactWidgetHs::onHide()"; |
585 qDebug() << "ContactWidgetHs::onHide()"; |
|
586 // close the launcher if it's open |
|
587 if (mLauncher->isVisible()) { |
|
588 mLauncher->close(); |
|
589 } |
583 } |
590 } |
584 |
591 |
585 |
592 |
586 /*! |
593 /*! |
587 Orientation changed slot |
594 Orientation changed slot |