equal
deleted
inserted
replaced
32 |
32 |
33 #include "DataManager.h" |
33 #include "DataManager.h" |
34 #include "lineeditcursor.h" |
34 #include "lineeditcursor.h" |
35 #include "ThemeModel.h" |
35 #include "ThemeModel.h" |
36 #include "themeprompt.h" |
36 #include "themeprompt.h" |
|
37 |
|
38 |
|
39 void ThemeListView::moveUp() |
|
40 { |
|
41 setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier)); |
|
42 } |
|
43 |
|
44 void ThemeListView::moveDown() |
|
45 { |
|
46 setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier)); |
|
47 } |
|
48 |
|
49 void ThemeListView::moveLeft() |
|
50 { |
|
51 setCurrentIndex(moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier)); |
|
52 } |
|
53 |
|
54 void ThemeListView::moveRight() |
|
55 { |
|
56 setCurrentIndex(moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier)); |
|
57 } |
37 |
58 |
38 ThemePrompt::ThemePrompt(int currentIndex, QWidget* parent) : QDialog(parent) |
59 ThemePrompt::ThemePrompt(int currentIndex, QWidget* parent) : QDialog(parent) |
39 { |
60 { |
40 setModal(true); |
61 setModal(true); |
41 setWindowFlags(Qt::Sheet); |
62 setWindowFlags(Qt::Sheet); |
126 dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight); |
147 dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight); |
127 } |
148 } |
128 |
149 |
129 void ThemePrompt::moveUp() |
150 void ThemePrompt::moveUp() |
130 { |
151 { |
131 list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier)); |
152 list->moveUp(); |
132 } |
153 } |
133 |
154 |
134 void ThemePrompt::moveDown() |
155 void ThemePrompt::moveDown() |
135 { |
156 { |
136 list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier)); |
157 list->moveDown(); |
137 } |
158 } |
138 |
159 |
139 void ThemePrompt::moveLeft() |
160 void ThemePrompt::moveLeft() |
140 { |
161 { |
141 list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier)); |
162 list->moveLeft(); |
142 } |
163 } |
143 |
164 |
144 void ThemePrompt::moveRight() |
165 void ThemePrompt::moveRight() |
145 { |
166 { |
146 list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier)); |
167 list->moveRight(); |
147 } |
168 } |
148 |
169 |
149 void ThemePrompt::onAccepted() |
170 void ThemePrompt::onAccepted() |
150 { |
171 { |
151 themeChosen(list->currentIndex()); |
172 themeChosen(list->currentIndex()); |