• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • workspace API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • libs
  • lancelot
  • widgets
PassagewayView.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007, 2008, 2009, 2010 Ivan Cukic <ivan.cukic(at)kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser/Library General Public License version 2,
6  * or (at your option) any later version, as published by the Free
7  * Software Foundation
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser/Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Lesser/Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #include "PassagewayView.h"
21 
22 #include <QApplication>
23 #include <QGraphicsSceneMouseEvent>
24 #include <QGraphicsView>
25 #include <QWidget>
26 #include <QPointer>
27 
28 #include <climits>
29 
30 namespace Lancelot {
31 
32 class PassagewayViewSizer: public ColumnLayout::ColumnSizer {
33 public:
34  PassagewayViewSizer()
35  {
36  m_sizer = ColumnLayout::ColumnSizer::create(ColumnLayout::ColumnSizer::GoldenSizer);
37  }
38 
39  void init(int size)
40  {
41  m_size = size;
42  m_pass = true;
43  if (size > 2) {
44  m_sizer->init(size - 1);
45  }
46  }
47 
48  qreal size()
49  {
50  if (!m_size) return 1.0;
51  if (m_size <= 2) return 1.0 / m_size;
52  if (m_pass) {
53  m_pass = false;
54  return 0.0;
55  } else {
56  return m_sizer->size();
57  }
58  }
59 
60 private:
61  ColumnLayout::ColumnSizer * m_sizer;
62  int m_size;
63  bool m_pass;
64 };
65 
66 class PassagewayView::Private {
67 public:
68  Private(ActionTreeModel * entranceModel,
69  ActionTreeModel * atlasModel,
70  PassagewayView * p)
71  : focusIndex(0), layout(NULL), buttonsLayout(NULL), listsLayout(NULL),
72  parent(p), popup(NULL), popupMenus(false)
73  {
74  parent->setLayout(layout = new NodeLayout());
75  layout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
76  layout->setMaximumSize(INT_MAX, INT_MAX);
77 
78  layout->addItem(
79  buttonsLayout = new ColumnLayout(),
80  NodeLayout::NodeCoordinate(0, 0, 0, 0),
81  NodeLayout::NodeCoordinate(1, 0, 0, 32)
82  );
83  buttonsLayout->setSizer(
84  ColumnLayout::ColumnSizer::create(
85  ColumnLayout::ColumnSizer::EqualSizer
86  )
87  );
88  buttonsLayout->setColumnCount(30);
89 
90  buttonsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
91  buttonsLayout->setMaximumSize(INT_MAX, INT_MAX);
92  buttonsLayout->setContentsMargins(EXTENDER_SIZE, 0, 0, 0);
93 
94  // ExtenderButton * spacer =
95  // new ExtenderButton(parent);
96  // spacer->setGroupByName("PassagewayView-Spacer");
97  // spacer->setMaximumSize(QSizeF(EXTENDER_SIZE, 32));
98  // spacer->setPreferredSize(QSizeF(EXTENDER_SIZE, 32));
99  // spacer->setMinimumSize(QSizeF(EXTENDER_SIZE, 32));
100  // buttonsLayout->push(spacer);
101 
102  layout->addItem(
103  listsLayout = new ColumnLayout(),
104  NodeLayout::NodeCoordinate(0, 0, 0, 32),
105  NodeLayout::NodeCoordinate(1, 1, 0, 0)
106  );
107 
108  listsLayout->setSizer(new PassagewayViewSizer());
109  listsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
110  listsLayout->setMaximumSize(INT_MAX, INT_MAX);
111 
112  //buttonsLayout->setSpacing(0.0);
113 
114  next(Step("", QIcon(), entranceModel));
115  next(Step("", QIcon(), atlasModel));
116  focusIndex = 0;
117 
118  lists.at(0)->setExtenderPosition(Lancelot::LeftExtender);
119  lists.at(0)->setCategoriesActivable(false);
120  lists.at(1)->setCategoriesActivable(true);
121  }
122 
123  ~Private()
124  {
125  delete buttonsLayout;
126  delete listsLayout;
127  delete layout;
128  delete popup;
129 
130  qDeleteAll(buttons);
131  qDeleteAll(lists);
132  qDeleteAll(path);
133  }
134 
135  class Step {
136  public:
137  Step(QString t, QIcon i, ActionTreeModel * m)
138  : title(t), icon(i), model(m) {};
139  QString title;
140  QIcon icon;
141  ActionTreeModel * model;
142  };
143 
144  class BreadcrumbItem : public Lancelot::ExtenderButton {
145  public:
146  BreadcrumbItem(QIcon icon, QString title, QString description,
147  QGraphicsItem * parent, PassagewayView::Private * parent_private)
148  : Lancelot::ExtenderButton(icon, title, description, parent),
149  d(parent_private)
150  {
151  }
152 
153  void mousePressEvent(QGraphicsSceneMouseEvent * event)
154  {
155  m_mousePos = event->pos();
156  ExtenderButton::mousePressEvent(event);
157  }
158 
159  void mouseMoveEvent(QGraphicsSceneMouseEvent * event)
160  {
161  ExtenderButton::mouseMoveEvent(event);
162  if (isDown() && ((m_mousePos - event->pos()).toPoint().manhattanLength() > QApplication::startDragDistance())) {
163  setDown(false);
164  d->startDrag(this, event);
165  }
166  }
167 
168  private:
169  PassagewayView::Private * d;
170  QPointF m_mousePos;
171  };
172 
173  void back(int steps, bool deselectLast = true)
174  {
175  if (steps == 0) {
176  return;
177  }
178 
179  for (int i = 0; i < steps; ++i) {
180  if (lists.size() == 0) {
181  return;
182  }
183 
184  if (buttons.size() > 2) {
185  buttons.at(buttons.size() - 3)->setGroupByName(parent->group()->name() + "-InactiveButton");
186  buttons.at(buttons.size() - 3)->setExtenderPosition(Lancelot::NoExtender);
187  }
188  ExtenderButton * button = buttons.takeLast();
189 
190  lists.last()->setShowsExtendersOutside(true);
191  ActionListView * list = lists.takeLast();
192  lists.last()->setShowsExtendersOutside(false);
193 
194  path.takeLast();
195 
196  // buttonsLayout->removeItem(button);
197  buttonsLayout->pop();
198 
199  // This really shouldn't be needed :(
200  buttonsLayout->setGeometry(buttonsLayout->geometry());
201 
202  listsLayout->pop();
203 
204  button->deleteLater();
205  list->deleteLater();
206  }
207 
208  if (focusIndex >= lists.size()) {
209  focusIndex = lists.size() - 1;
210  }
211 
212  if (deselectLast) {
213  lists.last()->clearSelection();
214  }
215  }
216 
217  void next(Step newStep)
218  {
219  Step * step = new Step(newStep);
220  ExtenderButton * button =
221  new BreadcrumbItem(step->icon, step->title, QString(), parent, this);
222  ActionListView * list =
223  new ActionListView(step->model, parent);
224  list->setGroupByName(parent->group()->name() + "-Atlas");
225 
226  button->setIconSize(QSize(22, 22));
227  button->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
228 
229  button->setGroupByName(parent->group()->name() + "-InactiveButton");
230  button->setExtenderPosition(Lancelot::NoExtender);
231 
232  buttons.append(button);
233  button->setZValue((qreal)buttons.count());
234 
235  if (buttons.size() > 2) {
236  buttons.at(buttons.size() - 3)->setGroupByName(parent->group()->name() + "-Button");
237  }
238 
239  list->setCategoriesGroupByName("ActionListView-CategoriesPass");
240  list->setCategoriesActivable(true);
241 
242  focusIndex = lists.count();
243  if (lists.size() > 1) {
244  lists.last()->setShowsExtendersOutside(true);
245  }
246  lists.append(list);
247  lists.last()->setShowsExtendersOutside(false);
248  lists.last()->setZValue(- lists.count());
249 
250  path.append(step);
251 
252  buttonsLayout->push(button);
253  listsLayout->push(list);
254 
255  // This really shouldn't be needed :(
256  buttonsLayout->setGeometry(buttonsLayout->geometry());
257  listsLayout->setGeometry(listsLayout->geometry());
258 
259 
260  QObject::connect(
261  list, SIGNAL(activated(int)),
262  parent, SLOT(listItemActivated(int))
263  );
264 
265  QObject::connect(
266  button, SIGNAL(activated()),
267  parent, SLOT(pathButtonActivated())
268  );
269  }
270 
271  void startDrag(BreadcrumbItem * item, QGraphicsSceneMouseEvent * event)
272  {
273  if (Global::self()->immutability() != Plasma::Mutable) {
274  return;
275  }
276 
277  int index = buttons.indexOf(item, 0);
278  if (index == -1) {
279  return;
280  }
281 
282  QMimeData * data = path.at(index)->model->selfMimeData();
283  if (!data) {
284  return;
285  }
286 
287  // QMimeData * data = new QMimeData();
288  // data->setData("text/uri-list", m_dragUrl.toAscii());
289  // data->setData("text/plain", m_dragUrl.toAscii());
290 
291  QWidget * widget = NULL;
292  if (item->scene() && item->scene()->views().size() > 0) {
293  widget = item->scene()->views().at(0);
294  }
295 
296  QDrag * drag = new QDrag(widget);
297  drag->setMimeData(data);
298 
299  // Pixmap for dragger
300  QPixmap pixmap(item->size().toSize());
301  QPainter painter(&pixmap);
302  painter.fillRect(QRect(QPoint(), pixmap.size()), QColor(100, 100, 100));
303  item->paint(&painter, 0, 0);
304  drag->setPixmap(pixmap);
305  drag->setHotSpot(event->pos().toPoint());
306 
307  drag->exec(); //krazy:exclude=crashy
308  }
309 
310 
311  QList < Step * > path;
312  QList < ExtenderButton * > buttons;
313  QList < ActionListView * > lists;
314  int focusIndex;
315 
316  NodeLayout * layout;
317  ColumnLayout::ColumnSizer * sizer;
318  // QGraphicsLinearLayout * buttonsLayout;
319  ColumnLayout * buttonsLayout;
320  ColumnLayout * listsLayout;
321  PassagewayView * parent;
322  QPointer < PopupMenu > popup;
323  bool popupMenus;
324 };
325 
326 PassagewayView::PassagewayView(QGraphicsItem * parent)
327  : Panel(parent), d(new Private(NULL, NULL, this))
328 {
329  setGroupByName("PassagewayView");
330 }
331 
332 PassagewayView::PassagewayView(ActionTreeModel * entranceModel,
333  ActionTreeModel * atlasModel, QGraphicsItem * parent)
334  : Panel(parent), d(new Private(entranceModel, atlasModel, this))
335 {
336  setGroupByName("PassagewayView");
337 }
338 
339 void PassagewayView::pathButtonActivated()
340 {
341  for (int i = d->buttons.size() - 1; i >= 0; --i) {
342  if (d->buttons.at(i) == sender()) {
343  d->back(d->buttons.size() - i - 2);
344  }
345  }
346 }
347 
348 void PassagewayView::listItemActivated(int index, int listIndex)
349 {
350  if (listIndex == -1) {
351  listIndex = d->lists.indexOf((ActionListView *)sender());
352  }
353 
354  if (listIndex == -1) {
355  return;
356  }
357 
358  if (listIndex == 0) {
359  // something in the entrance is clicked
360  // we don't want to remove the first level
361  // of atlas as well
362  d->back(d->lists.size() - listIndex - 2, false);
363  } else {
364  d->back(d->lists.size() - listIndex - 1, false);
365  }
366 
367  ActionTreeModel * model = d->path.at(listIndex)->model;
368  if (model) {
369  model = model->child(index);
370  if (model) {
371  if (d->popupMenus) {
372  if (!d->popup) {
373  d->popup = new PopupMenu();
374  }
375  d->popup->setModel(model);
376 
377  QPoint p = QCursor::pos();
378 
379  if (scene() && scene()->views().size()) {
380  QGraphicsView * view = scene()->views().first();
381 
382  p.setX(
383  (view->pos() + view->mapFromScene(scenePos())).x()
384  + geometry().width());
385 
386  p.setY(p.y() - 16);
387  }
388  d->popup->exec(p);
389  } else {
390  d->next(Private::Step(model->selfTitle(), model->selfIcon(), model));
391  }
392  } else {
393  d->lists.at(listIndex)->clearSelection();
394  }
395  }
396 }
397 
398 PassagewayView::~PassagewayView()
399 {
400  delete d;
401 }
402 
403 // Entrance
404 void PassagewayView::setEntranceModel(ActionTreeModel * model)
405 {
406  if (d->lists.size() < 2) return;
407  d->path.at(0)->model = model;
408  d->lists.at(0)->setModel(model);
409 }
410 
411 void PassagewayView::setEntranceTitle(const QString & title)
412 {
413  if (d->lists.size() < 2) return;
414  d->path.at(0)->title = title;
415  d->buttons.at(0)->setTitle(title);
416 }
417 
418 void PassagewayView::setEntranceIcon(QIcon icon)
419 {
420  if (d->lists.size() < 2) return;
421  d->path.at(0)->icon = icon;
422  d->buttons.at(0)->setIcon(icon);
423 }
424 
425 // Atlas
426 void PassagewayView::setAtlasModel(ActionTreeModel * model)
427 {
428  if (d->lists.size() < 2) return;
429  d->path.at(1)->model = model;
430  d->lists.at(1)->setModel(model);
431 }
432 
433 void PassagewayView::setAtlasTitle(const QString & title)
434 {
435  if (d->lists.size() < 2) return;
436  d->path.at(1)->title = title;
437  d->buttons.at(1)->setTitle(title);
438 }
439 
440 void PassagewayView::setAtlasIcon(QIcon icon)
441 {
442  if (d->lists.size() < 2) return;
443  d->path.at(1)->icon = icon;
444  d->buttons.at(1)->setIcon(icon);
445 }
446 
447 void PassagewayView::setGroup(Group * g)
448 {
449  Panel::setGroup(g);
450 
451  int i = d->buttons.size();
452  foreach (ExtenderButton * button, d->buttons) {
453  --i;
454  if (i < 2) {
455  button->setGroupByName(group()->name() + "-InactiveButton");
456  } else {
457  button->setGroupByName(group()->name() + "-Button");
458  }
459  }
460 
461  i = 0;
462  foreach (ActionListView * list, d->lists) {
463  if (i++ == 0) {
464  list->setGroupByName(group()->name() + "-Entrance");
465  } else {
466  list->setGroupByName(group()->name() + "-Atlas");
467  }
468  }
469 }
470 
471 void PassagewayView::setActivationMethod(int value)
472 {
473  if (value == Lancelot::ClickActivate) {
474  Global::self()->group(group()->name() + "-Entrance")
475  ->setProperty("extenderPosition", NoExtender);
476  Global::self()->group(group()->name() + "-Atlas")
477  ->setProperty("extenderPosition", NoExtender);
478  Global::self()->group(group()->name() + "-Button")
479  ->setProperty("extenderPosition", NoExtender);
480  Global::self()->group(group()->name() + "-Button")
481  ->setProperty("activationMethod", ClickActivate);
482  } else {
483  Global::self()->group(group()->name() + "-Entrance")
484  ->setProperty("extenderPosition", LeftExtender);
485  Global::self()->group(group()->name() + "-Atlas")
486  ->setProperty("extenderPosition", RightExtender);
487  Global::self()->group(group()->name() + "-Button")
488  ->setProperty("extenderPosition", LeftExtender);
489  Global::self()->group(group()->name() + "-Button")
490  ->setProperty("activationMethod", ExtenderActivate);
491  }
492  // Global::self()->group(group()->name() + "-Entrance")
493  // ->notifyUpdated();
494  // Global::self()->group(group()->name() + "-Atlas")
495  // ->notifyUpdated();
496  // Global::self()->group(group()->name() + "-Button")
497  // ->notifyUpdated();
498 }
499 
500 int PassagewayView::activationMethod() const
501 {
502  return Lancelot::ClickActivate;
503 }
504 
505 void PassagewayView::setColumnLimit(int limit)
506 {
507  if (limit > 0) {
508  d->listsLayout->setColumnCount(limit);
509  d->popupMenus = false;
510  } else {
511  d->listsLayout->setColumnCount(2);
512  d->popupMenus = true;
513  }
514 }
515 
516 void PassagewayView::reset()
517 {
518  d->focusIndex = 0;
519  if (d->lists.size() > 2) {
520  d->back(d->lists.size() - 2);
521  }
522 }
523 
524 void PassagewayView::clearSelection()
525 {
526 
527 }
528 
529 void PassagewayView::keyPressEvent(QKeyEvent * event)
530 {
531  // We should open a submenu on right arrow pressed,
532  // but not activate item if not a submenu
533  if (event->key() == Qt::Key_Right) {
534  ActionTreeModel * model = d->path.at(d->focusIndex)->model;
535  int index = d->lists.at(d->focusIndex)->selectedIndex();
536  if (index >= 0 && model && (model = model->child(index))) {
537  listItemActivated(index, d->focusIndex);
538  return;
539  }
540  }
541 
542  // And we should shift left if user moved left
543  if (event->key() == Qt::Key_Left) {
544  if (d->focusIndex < d->lists.count() - 1 && d->focusIndex != 0) {
545  d->back(1);
546  }
547  }
548 
549  // Normal handling
550  bool pass = false;
551  int oindex = d->focusIndex;
552 
553  switch (event->key()) {
554  case Qt::Key_Up:
555  case Qt::Key_Down:
556  d->lists.at(d->focusIndex)->keyPressEvent(event);
557  break;
558  case Qt::Key_Left:
559  d->focusIndex--;
560  break;
561  case Qt::Key_Right:
562  d->focusIndex++;
563  break;
564  default:
565  pass = true;
566  }
567 
568 
569  if (d->focusIndex < 0) {
570  d->focusIndex = 0;
571  pass = true;
572  } else if (d->focusIndex >= d->lists.size()) {
573  d->focusIndex = d->lists.size() - 1;
574  pass = true;
575  }
576 
577  if (oindex != d->focusIndex) {
578  if ((oindex == 0 || oindex > d->focusIndex) && oindex < d->lists.count()) {
579  d->lists.at(oindex)->clearSelection();
580  }
581  if (d->focusIndex == 0 || oindex < d->focusIndex) {
582  d->lists.at(d->focusIndex)->initialSelection();
583  }
584  }
585 
586  if (pass) {
587  d->lists.at(d->focusIndex)->keyPressEvent(event);
588  }
589 }
590 
591 void PassagewayView::hideEvent(QHideEvent * event)
592 {
593  if (d->popup) {
594  d->popup->hide();
595  }
596 }
597 
598 } // namespace Lancelot
599 
QHideEvent
Lancelot::Widget::group
Group * group() const
Returns this widget's group.
Lancelot::Widget::setGroupByName
virtual void setGroupByName(const QString &groupName)
Sets this widget's group by group name.
Definition: Widget.cpp:134
Lancelot::PassagewayView::setEntranceTitle
void setEntranceTitle(const QString &title)
Definition: PassagewayView.cpp:411
QDrag::setHotSpot
void setHotSpot(const QPoint &hotspot)
Lancelot::NoExtender
Definition: lancelot.h:32
QGraphicsItem::x
qreal x() const
QWidget
Lancelot::ExtenderActivate
Definition: lancelot.h:42
Lancelot::PassagewayView::setActivationMethod
void setActivationMethod(int value)
Definition: PassagewayView.cpp:471
Lancelot::Widget::mousePressEvent
L_Override void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: Widget.cpp:98
QDrag::setMimeData
void setMimeData(QMimeData *data)
QGraphicsLayoutItem::geometry
QRectF geometry() const
Lancelot::Global::self
static Global * self()
Definition: Global.cpp:307
QObject::sender
QObject * sender() const
QDrag::setPixmap
void setPixmap(const QPixmap &pixmap)
Lancelot::PassagewayView::setColumnLimit
void setColumnLimit(int limit)
Definition: PassagewayView.cpp:505
Lancelot::ExtenderButton::ExtenderButton
ExtenderButton(QGraphicsItem *parent=0)
Creates a new Lancelot::ExtenderButton.
Definition: ExtenderButton.cpp:299
QSizePolicy
QPointer
Lancelot::Panel::setGroup
L_Override void setGroup(Group *group=NULL)
Sets this widget's group.
Definition: Panel.cpp:188
PassagewayView.h
QGraphicsItem
QPoint
Lancelot::ColumnLayout::ColumnSizer::GoldenSizer
Sizer that uses golden ratio for visible column sizes.
Definition: ColumnLayout.h:86
EXTENDER_SIZE
#define EXTENDER_SIZE
Definition: ExtenderButton.h:28
Lancelot::ActionListView
Definition: ActionListView.h:33
Lancelot::PassagewayView::listItemActivated
virtual void listItemActivated(int itemIndex, int listIndex=-1)
Definition: PassagewayView.cpp:348
QGraphicsWidget::event
virtual bool event(QEvent *event)
QGraphicsItem::scene
QGraphicsScene * scene() const
Lancelot::Global::group
Group * group(const QString &name)
Definition: Global.cpp:442
QMimeData
QPoint::y
int y() const
QPointF
QGraphicsWidget::size
QSizeF size() const
QDrag::exec
Qt::DropAction exec(QFlags< Qt::DropAction > supportedActions)
Lancelot::PassagewayView::setAtlasTitle
void setAtlasTitle(const QString &title)
Definition: PassagewayView.cpp:433
QObject::name
const char * name() const
QRect
Lancelot::PassagewayView::setGroup
L_Override void setGroup(Group *group=NULL)
Sets this widget's group.
Definition: PassagewayView.cpp:447
Lancelot::ColumnLayout::ColumnSizer::EqualSizer
Sizer that returns the same size for all visible columns.
Definition: ColumnLayout.h:85
Lancelot::PassagewayView::activationMethod
int activationMethod() const
Lancelot::PassagewayView::setAtlasIcon
void setAtlasIcon(QIcon icon)
Definition: PassagewayView.cpp:440
QGraphicsItem::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Lancelot::PassagewayView::setEntranceModel
void setEntranceModel(ActionTreeModel *model)
Definition: PassagewayView.cpp:404
QGraphicsSceneMouseEvent
QGraphicsScene::views
QList< QGraphicsView * > views() const
QPainter
Lancelot::ActionTreeModel::child
virtual ActionTreeModel * child(int index)=0
QDrag
Lancelot::Group
Represents a group of object.
Definition: Global.h:63
Lancelot::PassagewayView::PassagewayView
PassagewayView(QGraphicsItem *parent=0)
Definition: PassagewayView.cpp:326
QWidget::pos
pos
QGraphicsView::mapFromScene
QPoint mapFromScene(const QPointF &point) const
Lancelot::Panel
A container widget with optional title-bar.
Definition: Panel.h:38
Lancelot::PassagewayView::~PassagewayView
virtual ~PassagewayView()
Definition: PassagewayView.cpp:398
Lancelot::ActionListModel::selfIcon
virtual QIcon selfIcon() const
Definition: ActionListModel.cpp:123
QString
QList< Step * >
Lancelot::ActionListModel::selfTitle
virtual QString selfTitle() const
Definition: ActionListModel.cpp:113
QColor
QGraphicsLayoutItem::setSizePolicy
void setSizePolicy(const QSizePolicy &policy)
QPixmap
QKeyEvent::key
int key() const
QSize
Lancelot::LeftExtender
Definition: lancelot.h:34
Lancelot::ActionTreeModel
Definition: ActionTreeModel.h:30
Lancelot::PassagewayView::setEntranceIcon
void setEntranceIcon(QIcon icon)
Definition: PassagewayView.cpp:418
Lancelot::PassagewayView::reset
void reset()
Definition: PassagewayView.cpp:516
Lancelot::PopupMenu
The popup menu class.
Definition: PopupMenu.h:37
QGraphicsLayoutItem::setMaximumSize
void setMaximumSize(const QSizeF &size)
Lancelot::PassagewayView::keyPressEvent
L_Override void keyPressEvent(QKeyEvent *event)
Definition: PassagewayView.cpp:529
QKeyEvent
QGraphicsItem::data
QVariant data(int key) const
QRectF::width
qreal width() const
Lancelot::Panel::icon
QIcon icon() const
QCursor::pos
QPoint pos()
QPointF::toPoint
QPoint toPoint() const
Lancelot::PassagewayView::pathButtonActivated
virtual void pathButtonActivated()
Definition: PassagewayView.cpp:339
Lancelot::ColumnLayout::ColumnSizer::create
static ColumnSizer * create(SizerType type)
Definition: ColumnLayout.cpp:84
Lancelot::PassagewayView::setAtlasModel
void setAtlasModel(ActionTreeModel *model)
Definition: PassagewayView.cpp:426
Lancelot::Widget::isDown
bool isDown() const
Definition: Widget.cpp:251
Lancelot::Panel::title
QString title() const
QPoint::setX
void setX(int x)
QPoint::setY
void setY(int y)
QGraphicsWidget::layout
QGraphicsLayout * layout() const
Lancelot::PassagewayView::clearSelection
void clearSelection()
Definition: PassagewayView.cpp:524
Lancelot::PassagewayView::hideEvent
L_Override void hideEvent(QHideEvent *event)
Definition: PassagewayView.cpp:591
Lancelot::ExtenderButton
Button widget with special activation options beside clicking - hover and extender activation...
Definition: ExtenderButton.h:39
QGraphicsSceneMouseEvent::pos
QPointF pos() const
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::parent
QObject * parent() const
Lancelot::Group::setProperty
void setProperty(const QString &property, const QVariant &value, bool persistent=true)
Sets the value of the specified property.
Definition: Global.cpp:174
QGraphicsView
Lancelot::Widget::setDown
void setDown(bool value)
Sets whether the widget is down (pressed).
Definition: Widget.cpp:92
QGraphicsItem::scenePos
QPointF scenePos() const
QIcon
Lancelot::ClickActivate
Definition: lancelot.h:41
QApplication::startDragDistance
int startDragDistance()
Lancelot::RightExtender
Definition: lancelot.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal