~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/kworkspace/kwindowlistmenu.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************
 
2
 
 
3
Copyright (c) 2000 Matthias Elter <elter@kde.org>
 
4
                   Matthias Ettrich <ettrich@kde.org>
 
5
 
 
6
Permission is hereby granted, free of charge, to any person obtaining a copy
 
7
of this software and associated documentation files (the "Software"), to deal
 
8
in the Software without restriction, including without limitation the rights
 
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
10
copies of the Software, and to permit persons to whom the Software is
 
11
furnished to do so, subject to the following conditions:
 
12
 
 
13
The above copyright notice and this permission notice shall be included in
 
14
all copies or substantial portions of the Software.
 
15
 
 
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
19
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
22
 
 
23
******************************************************************/
 
24
 
 
25
#ifndef KWINDOWLISTMENU_H
 
26
#define KWINDOWLISTMENU_H
 
27
 
 
28
#include <kdemacros.h>
 
29
#include <kmenu.h>
 
30
 
 
31
/**
 
32
 * This class provides a menu which contains actions
 
33
 * to manage a window. It is used by the window manager
 
34
 * for example an accessable there via the menu button of
 
35
 * the window decoration.
 
36
 */
 
37
class KDE_EXPORT KWindowListMenu : public KMenu
 
38
{
 
39
    Q_OBJECT
 
40
 
 
41
  public:
 
42
    /**
 
43
     * Creates a new window list menu.
 
44
     *
 
45
     * @param parent The parent widget.
 
46
     */
 
47
    explicit KWindowListMenu( QWidget *parent = 0 );
 
48
 
 
49
    /**
 
50
     * Destroys the window list menu.
 
51
     */
 
52
    virtual ~KWindowListMenu();
 
53
 
 
54
    /**
 
55
     * Initializes the menu by filling it with actions
 
56
     * for managing a window.
 
57
     */
 
58
    void init();
 
59
 
 
60
  public Q_SLOTS:
 
61
    /**
 
62
     * Pre-selects the active window in the popup menu, for faster
 
63
     * keyboard navigation. Needs to be called after popup().
 
64
     * Should not be used when the popup is invoked using the mouse. 
 
65
     */
 
66
    void selectActiveWindow();
 
67
 
 
68
  protected Q_SLOTS:
 
69
    void slotForceActiveWindow();
 
70
    void slotSetCurrentDesktop();
 
71
    void slotUnclutterWindows();
 
72
    void slotCascadeWindows();
 
73
 
 
74
  private:
 
75
    class Private;
 
76
    Private* const d;
 
77
};
 
78
 
 
79
#endif