src/hbapps/hbthemechanger/themeselectionlist.h
changeset 6 c3690ec91ef8
parent 5 627c4a0fd0e7
child 7 923ff622b8b9
equal deleted inserted replaced
5:627c4a0fd0e7 6:c3690ec91ef8
    40 class ThemeSelectionList:public HbView
    40 class ThemeSelectionList:public HbView
    41 {
    41 {
    42 Q_OBJECT
    42 Q_OBJECT
    43 public:
    43 public:
    44 
    44 
    45     ThemeSelectionList();
    45     ThemeSelectionList(HbMainWindow *mainWindow);
    46     ~ThemeSelectionList();
    46     ~ThemeSelectionList();
    47 signals:
    47 signals:
    48     void newThemeSelected(const QString &newthemepath);
    48     void newThemeSelected(const QString &newthemepath);
    49 public slots:
    49 public slots:
    50     void displayThemes();
    50     void displayThemes();
    51     void setChosen(HbListWidgetItem *item);
    51     void setChosen(HbListWidgetItem *item);
       
    52     void onLongPressed(HbListWidgetItem* listViewItem, const QPointF& coords);
    52     void applySelection();
    53     void applySelection();
    53     void updateThemeList(const QString &path);
    54     void updateThemeList(const QString &path);
    54     void sendThemeName(const QString& name);
    55     void sendThemeName(const QString& name);
       
    56     void cancelTheme();
       
    57     void applyTheme();
    55 #ifdef THEME_CHANGER_TIMER_LOG
    58 #ifdef THEME_CHANGER_TIMER_LOG
    56     void processWhenIdle();
    59     void processWhenIdle();
    57     void themeChanged();
    60     void themeChanged();
    58 #endif
    61 #endif
    59 
    62 
    60 protected:
    63 protected:
    61     bool event(QEvent *e);
       
    62     void resizeEvent(QResizeEvent* event);
    64     void resizeEvent(QResizeEvent* event);
    63 private:
    65 private:
    64     static QStringList rootPaths();
    66     static QStringList rootPaths();
    65     QDir dir; 
    67     QDir dir; 
    66     int oldItemIndex;
    68     int oldItemIndex;
    67     HbListWidget *themelist;
    69     HbListWidget *themelist;
    68     HbIcon* rightMark;
    70     HbIcon* rightMark;
    69     HbIcon* noMark;
    71     HbIcon* noMark;
    70     HbAction *action;
    72     HbAction *action;
    71     QList<HbIcon*> thumbnails;
    73     QList<HbIcon*> thumbnails;
       
    74     HbAction* mOkAction;
       
    75     HbAction* mCancelAction;
       
    76     HbMainWindow *mMainWindow;
       
    77     HbListWidgetItem* previewItem;
       
    78     HbView *previewView;
    72 
    79 
    73     QFileSystemWatcher *watcher;
    80     QFileSystemWatcher *watcher;
    74     QString iCurrentTheme;
    81     QString iCurrentTheme;
    75 #ifdef THEME_CHANGER_TIMER_LOG
    82 #ifdef THEME_CHANGER_TIMER_LOG
    76     QTime timer;
    83     QTime timer;