Lines 23-28
Link Here
|
23 |
#include <QGraphicsSceneMouseEvent> |
23 |
#include <QGraphicsSceneMouseEvent> |
24 |
#include <QGraphicsView> |
24 |
#include <QGraphicsView> |
25 |
#include <QApplication> |
25 |
#include <QApplication> |
|
|
26 |
#include <climits> |
26 |
|
27 |
|
27 |
namespace Lancelot { |
28 |
namespace Lancelot { |
28 |
|
29 |
|
Lines 68-79
Link Here
|
68 |
: layout(NULL), buttonsLayout(NULL), listsLayout(NULL), parent(p), focusIndex(0) |
69 |
: layout(NULL), buttonsLayout(NULL), listsLayout(NULL), parent(p), focusIndex(0) |
69 |
{ |
70 |
{ |
70 |
parent->setLayout(layout = new NodeLayout()); |
71 |
parent->setLayout(layout = new NodeLayout()); |
|
|
72 |
layout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
73 |
layout->setMaximumSize(INT_MAX, INT_MAX); |
71 |
|
74 |
|
72 |
layout->addItem( |
75 |
layout->addItem( |
73 |
buttonsLayout = new QGraphicsLinearLayout(Qt::Horizontal), |
76 |
buttonsLayout = new QGraphicsLinearLayout(Qt::Horizontal), |
74 |
NodeLayout::NodeCoordinate(0, 0, 0, 0), |
77 |
NodeLayout::NodeCoordinate(0, 0, 0, 0), |
75 |
NodeLayout::NodeCoordinate(1, 0, 0, 32) |
78 |
NodeLayout::NodeCoordinate(1, 0, 0, 32) |
76 |
); |
79 |
); |
|
|
80 |
buttonsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
81 |
buttonsLayout->setMaximumSize(INT_MAX, INT_MAX); |
77 |
|
82 |
|
78 |
ExtenderButton * spacer = |
83 |
ExtenderButton * spacer = |
79 |
new ExtenderButton(parent); |
84 |
new ExtenderButton(parent); |
Lines 90-95
Link Here
|
90 |
); |
95 |
); |
91 |
|
96 |
|
92 |
listsLayout->setSizer(new PassagewayViewSizer()); |
97 |
listsLayout->setSizer(new PassagewayViewSizer()); |
|
|
98 |
listsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); |
99 |
listsLayout->setMaximumSize(INT_MAX, INT_MAX); |
93 |
|
100 |
|
94 |
buttonsLayout->setSpacing(0.0); |
101 |
buttonsLayout->setSpacing(0.0); |
95 |
|
102 |
|
Lines 164-170
Link Here
|
164 |
path.takeLast(); |
171 |
path.takeLast(); |
165 |
|
172 |
|
166 |
buttonsLayout->removeItem(button); |
173 |
buttonsLayout->removeItem(button); |
167 |
layout->activate(); |
174 |
|
|
|
175 |
// This really shouldn't be needed :( |
176 |
buttonsLayout->setGeometry(buttonsLayout->geometry()); |
177 |
|
168 |
listsLayout->pop(); |
178 |
listsLayout->pop(); |
169 |
|
179 |
|
170 |
button->deleteLater(); |
180 |
button->deleteLater(); |
Lines 199-217
Link Here
|
199 |
list->setCategoriesGroupByName("ActionListView-CategoriesPass"); |
209 |
list->setCategoriesGroupByName("ActionListView-CategoriesPass"); |
200 |
list->setCategoriesActivable(true); |
210 |
list->setCategoriesActivable(true); |
201 |
|
211 |
|
202 |
// if (lists.count() > 0) { |
|
|
203 |
// lists.last()->clearSelection(); |
204 |
// } |
205 |
|
206 |
focusIndex = lists.count(); |
212 |
focusIndex = lists.count(); |
207 |
lists.append(list); |
213 |
lists.append(list); |
208 |
|
214 |
|
209 |
// list->initialSelection(); |
|
|
210 |
path.append(step); |
215 |
path.append(step); |
211 |
|
216 |
|
212 |
buttonsLayout->addItem(button); |
217 |
buttonsLayout->addItem(button); |
213 |
listsLayout->push(list); |
218 |
listsLayout->push(list); |
214 |
|
219 |
|
|
|
220 |
// This really shouldn't be needed :( |
221 |
buttonsLayout->setGeometry(buttonsLayout->geometry()); |
222 |
listsLayout->setGeometry(listsLayout->geometry()); |
223 |
|
224 |
|
215 |
QObject::connect( |
225 |
QObject::connect( |
216 |
list, SIGNAL(activated(int)), |
226 |
list, SIGNAL(activated(int)), |
217 |
parent, SLOT(listItemActivated(int)) |
227 |
parent, SLOT(listItemActivated(int)) |