QTfrontend/ui/widget/themeprompt.h
branchwebgl
changeset 8833 c13ebed437cb
parent 8623 93645b4ba0de
child 9080 9b42757d7e71
equal deleted inserted replaced
8450:404ddce27b23 8833:c13ebed437cb
    19 #ifndef THEMEPROMPT_H
    19 #ifndef THEMEPROMPT_H
    20 #define THEMEPROMPT_H
    20 #define THEMEPROMPT_H
    21 
    21 
    22 #include <QWidget>
    22 #include <QWidget>
    23 #include <QDialog>
    23 #include <QDialog>
       
    24 #include <QListView>
    24 
    25 
    25 class QLabel;
    26 class QLineEdit;
       
    27 class QModelIndex;
       
    28 class QSortFilterProxyModel;
       
    29 class LineEditCursor;
       
    30 
       
    31 class ThemeListView : public QListView
       
    32 {
       
    33     friend class ThemePrompt;
       
    34 
       
    35     public:
       
    36         ThemeListView(QWidget* parent = 0) : QListView(parent){}
       
    37         void moveUp();
       
    38         void moveDown();
       
    39         void moveLeft();
       
    40         void moveRight();
       
    41 };
    26 
    42 
    27 class ThemePrompt : public QDialog
    43 class ThemePrompt : public QDialog
    28 {
    44 {
    29         Q_OBJECT
    45         Q_OBJECT
    30 
    46 
    31     public:
    47     public:
    32         ThemePrompt(QWidget* parent);
    48         ThemePrompt(int currentIndex = 0, QWidget* parent = 0);
    33 
    49 
    34     private:
    50     private:
    35         QLabel * lblToolTip;
    51         LineEditCursor * txtFilter;
       
    52         ThemeListView * list;
       
    53         QSortFilterProxyModel * filterModel;
    36 
    54 
    37     private slots:
    55     private slots:
    38         void themeClicked();
    56         void onAccepted();
       
    57         void themeChosen(const QModelIndex & index);
       
    58         void filterChanged(const QString & text);
       
    59         void moveUp();
       
    60         void moveDown();
       
    61         void moveLeft();
       
    62         void moveRight();
    39 };
    63 };
    40 
    64 
    41 #endif // THEMEPROMPT_H
    65 #endif // THEMEPROMPT_H