• 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
PopupList.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_H
21 #define LANCELOT_POPUPLIST_H
22 
23 #include <Plasma/Dialog>
24 
25 #include <lancelot/lancelot_export.h>
26 #include <lancelot/lancelot.h>
27 #include <lancelot/Global.h>
28 
29 namespace Lancelot {
30 
31 class ActionListView;
32 class ActionListModel;
33 
41 class LANCELOT_EXPORT PopupList: public Plasma::Dialog {
42  Q_OBJECT
43 
44  Q_PROPERTY ( int closeTimeout READ closeTimeout WRITE setCloseTimeout )
45  Q_PROPERTY ( SublevelOpenAction sublevelOpenAction READ sublevelOpenAction WRITE setSublevelOpenAction )
46 
47 public:
52  enum SublevelOpenAction {
53  NoAction = 0,
54  PopupNew,
55  OpenInside
56  };
57 
62  explicit PopupList(QWidget * parent = 0, Qt::WindowFlags f = Qt::Window);
63 
67  virtual ~PopupList();
68 
74  void setCloseTimeout(int timeout);
75 
79  int closeTimeout() const;
80 
85  void setSublevelOpenAction(SublevelOpenAction action);
86 
90  SublevelOpenAction sublevelOpenAction() const;
91 
96  void setModel(ActionListModel * model);
97 
102  void exec(const QPoint & p);
103 
104 // /**
105 // * Shows the widget
106 // */
107 // void show();
108 
109 protected:
110  L_Override void showEvent(QShowEvent * event);
111  L_Override void hideEvent(QHideEvent * event);
112 
113  L_Override void enterEvent(QEvent * event);
114  L_Override void leaveEvent(QEvent * event);
115  L_Override void timerEvent(QTimerEvent * event);
116  L_Override bool eventFilter(QObject * object, QEvent * event);
117 
123  void exec(const QPoint & p, PopupList * parent);
124 
128  void moveTo(const QPoint & p);
129 
133  PopupList * parentList() const;
134 
135 Q_SIGNALS:
136  void activated(int index);
137 
138 public Q_SLOTS:
142  void updateSize();
143 
144 private:
145  class Private;
146  Private * const d;
147 };
148 
149 } // namespace Lancelot
150 
151 #endif /* LANCELOT_POPUPLIST_H */
152 
QHideEvent
QEvent
QWidget
Lancelot::PopupList::SublevelOpenAction
SublevelOpenAction
This enum represents behaviour patterns when an item with a submenu is activated. ...
Definition: PopupList.h:52
Lancelot::ActionListModel
This class represents a list data model.
Definition: ActionListModel.h:37
QPoint
L_Override
#define L_Override
Definition: lancelot_export.h:41
Lancelot::PopupList
The list that pops up in its own window.
Definition: PopupList.h:41
lancelot_export.h
QTimerEvent
QShowEvent
QObject
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
Global.h
lancelot.h
Qt::WindowFlags
typedef WindowFlags
Lancelot::PopupList::PopupNew
Pops a new list.
Definition: PopupList.h:54
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