• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeplasma-addons API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • sources
  • kde-4.14
  • kdeplasma-addons
  • libs
  • lancelot
  • widgets
PopupList_p.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 #ifndef LANCELOT_POPUPLIST_PH
21 #define LANCELOT_POPUPLIST_PH
22 
23 #include "PopupList.h"
24 
25 #include <QBasicTimer>
26 #include <QPropertyAnimation>
27 #include <QPointer>
28 
29 #include <KGlobalSettings>
30 
31 #include <lancelot/widgets/ActionListView.h>
32 #include <lancelot/models/ActionTreeModel.h>
33 #include <lancelot/models/ActionListModel.h>
34 
35 namespace Lancelot {
36 
37 class PopupListMarginCache: public QObject {
38  Q_OBJECT
39 public:
40  static PopupListMarginCache * self();
41 
42  int width();
43  int height();
44 
45 public Q_SLOTS:
46  void plasmaThemeChanged();
47 
48 private:
49  int m_width;
50  int m_height;
51 
52  void updateSizes();
53  static PopupListMarginCache * m_instance;
54  PopupListMarginCache();
55 
56 };
57 
58 class PopupList::Private: public QObject {
59  Q_OBJECT
60 public:
61  Private(PopupList * parent);
62  ~Private();
63 
64  ActionListView * list;
65  QGraphicsScene * scene;
66 
67  ActionListModel * listModel;
68  ActionTreeModel * treeModel;
69 
70  PopupList::SublevelOpenAction openAction;
71 
72  QBasicTimer timer;
73  int closeTimeout;
74 
75  QPointer < PopupList > child;
76  PopupList * parentList;
77  PopupList * q;
78 
79  QPropertyAnimation * animation;
80  bool hovered;
81 
82  void hidePopupAndParents();
83  void prepareToShow();
84 
85 public Q_SLOTS:
86  void listItemActivated(int index);
87  void connectSignals();
88 };
89 
90 } // namespace Lancelot
91 
92 #endif /* LANCELOT_POPUPLIST_PH */
93 
Lancelot::PopupList::Private::listModel
ActionListModel * listModel
Definition: PopupList_p.h:67
Lancelot::PopupList::SublevelOpenAction
SublevelOpenAction
This enum represents behaviour patterns when an item with a submenu is activated. ...
Definition: PopupList.h:52
QGraphicsScene
Lancelot::PopupList::Private::connectSignals
void connectSignals()
Definition: PopupList.cpp:127
QBasicTimer
Lancelot::ActionListModel
This class represents a list data model.
Definition: ActionListModel.h:37
QPointer
Lancelot::PopupList::Private::Private
Private(PopupList *parent)
Definition: PopupList.cpp:90
Lancelot::PopupList::Private::treeModel
ActionTreeModel * treeModel
Definition: PopupList_p.h:68
Lancelot::PopupList::Private
Definition: PopupList_p.h:58
PopupList.h
Lancelot::ActionListView
Definition: ActionListView.h:33
Lancelot::PopupList::Private::animation
QPropertyAnimation * animation
Definition: PopupList_p.h:79
Lancelot::PopupListMarginCache
Definition: PopupList_p.h:37
Lancelot::PopupList
The list that pops up in its own window.
Definition: PopupList.h:41
Lancelot::PopupList::Private::hidePopupAndParents
void hidePopupAndParents()
Definition: PopupList.cpp:172
QPropertyAnimation
Lancelot::PopupList::Private::child
QPointer< PopupList > child
Definition: PopupList_p.h:75
Lancelot::PopupList::Private::scene
QGraphicsScene * scene
Definition: PopupList_p.h:65
QObject
Lancelot::PopupList::Private::parentList
PopupList * parentList
Definition: PopupList_p.h:76
Lancelot::PopupList::Private::timer
QBasicTimer timer
Definition: PopupList_p.h:72
Lancelot::PopupList::Private::openAction
PopupList::SublevelOpenAction openAction
Definition: PopupList_p.h:70
ActionListModel.h
Lancelot::PopupList::Private::closeTimeout
int closeTimeout
Definition: PopupList_p.h:73
Lancelot::PopupList::Private::listItemActivated
void listItemActivated(int index)
Definition: PopupList.cpp:147
Lancelot::PopupListMarginCache::plasmaThemeChanged
void plasmaThemeChanged()
Definition: PopupList.cpp:74
Lancelot::ActionTreeModel
Definition: ActionTreeModel.h:30
Lancelot::PopupList::Private::hovered
bool hovered
Definition: PopupList_p.h:80
ActionListView.h
Lancelot::PopupList::Private::prepareToShow
void prepareToShow()
Definition: PopupList.cpp:320
Lancelot::PopupList::Private::~Private
~Private()
Definition: PopupList.cpp:141
Lancelot::PopupListMarginCache::width
int width()
Definition: PopupList.cpp:58
Lancelot::PopupListMarginCache::height
int height()
Definition: PopupList.cpp:66
Lancelot::PopupList::Private::list
ActionListView * list
Definition: PopupList_p.h:64
Lancelot::PopupList::Private::q
PopupList * q
Definition: PopupList_p.h:77
ActionTreeModel.h
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:12 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

kdeplasma-addons API Reference

Skip menu "kdeplasma-addons API Reference"
  •     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