controlpanelplugins/themeplugin/src/cpthemecontrol.cpp
changeset 17 4a9568303383
parent 14 23411a3be0db
child 24 f5dfdd5e4a1b
equal deleted inserted replaced
15:cc79acdc26cb 17:4a9568303383
    28 
    28 
    29  */
    29  */
    30 
    30 
    31 #include <QString>
    31 #include <QString>
    32 #include <QModelIndex>
    32 #include <QModelIndex>
    33 #include <QStandardItemModel>
       
    34 #include <QStandardItem>
       
    35 #include <QTranslator>
    33 #include <QTranslator>
    36 #include <QSortFilterProxyModel>
    34 #include <QSortFilterProxyModel>
    37 #include <QDebug>
       
    38 #include <QThread>
    35 #include <QThread>
    39 
    36 
    40 #include <hbmainwindow.h>
    37 #include <hbmainwindow.h>
    41 #include <hbinstance.h>
    38 #include <hbinstance.h>
    42 #include "cpthemechanger.h"
    39 #include "cpthemechanger.h"
   140 	the view.  
   137 	the view.  
   141 */
   138 */
   142 CpBaseSettingView* CpThemeControl::themeListView()
   139 CpBaseSettingView* CpThemeControl::themeListView()
   143 {
   140 {
   144     //If the view was removed before by control panel app, create it again.
   141     //If the view was removed before by control panel app, create it again.
   145     if(!mThemeListView)
   142     if(!mThemeListView) {
   146         createThemeList();
   143         createThemeList();
       
   144     }
   147 
   145 
   148     return mThemeListView;
   146     return mThemeListView;
   149 }
   147 }
   150 
   148 
   151 /*!
   149 /*!
   246     //ask the themelistview to close.  Control Panel will
   244     //ask the themelistview to close.  Control Panel will
   247     //take care of removing it from window.
   245     //take care of removing it from window.
   248     triggerThemeListClose();
   246     triggerThemeListClose();
   249 
   247 
   250 }
   248 }
       
   249 
   251 /*!
   250 /*!
   252 	Slot called when the theme preview view is closed.
   251 	Slot called when the theme preview view is closed.
   253 */
   252 */
   254 void CpThemeControl::previewClosed()
   253 void CpThemeControl::previewClosed()
   255 {
   254 {
   287     mThemeListView->closeView();
   286     mThemeListView->closeView();
   288 }
   287 }
   289 
   288 
   290 void CpThemeControl::themeChangeTimeout()
   289 void CpThemeControl::themeChangeTimeout()
   291 {
   290 {
   292     //qDebug() << "ThemeChangeTimeout " ;
       
   293     mIdleTimer->stop();
   291     mIdleTimer->stop();
   294     QThread::currentThread()->setPriority(QThread::NormalPriority);    
   292     QThread::currentThread()->setPriority(QThread::NormalPriority); 
   295         
   293         
   296 }
   294 }
   297 
   295 
   298 void CpThemeControl::themeChangeFinished()
   296 void CpThemeControl::themeChangeFinished()
   299 {
   297 {
   300     //qDebug() << "ThemeChangeFinished " ;
       
   301     mIdleTimer->start(0);
   298     mIdleTimer->start(0);
   302 }
   299 }
   303 
   300 
   304 /*!
   301 /*!
   305  * Private function that sets the current index of theme list view to indicate
   302  * Private function that sets the current index of theme list view to indicate