~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to kicker/libkicker/abstractpanelmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-10-31 19:16:54 UTC
  • Revision ID: james.westby@ubuntu.com-20071031191654-xuof6e1jg6uxqaze
Tags: 3.95.0-0ubuntu1~gutsy1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************
2
 
 *
3
 
 * Copyright (c) 2005 Aaron J. Seigo <aseigo@kde.org>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Library General Public
7
 
 * License version 2 as published by the Free Software Foundation.
8
 
 *
9
 
 * This library 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 GNU
12
 
 * Library General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU Library General Public License
15
 
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 
 * Boston, MA 02110-1301, USA.
18
 
 *
19
 
 *****************************************************************/
20
 
 
21
 
#include "utils.h"
22
 
 
23
 
#ifndef abstractpanelmanager_h
24
 
#define abstractpanelmanager_h
25
 
 
26
 
class ExtensionContainer;
27
 
 
28
 
class KDE_EXPORT AbstractPanelManager
29
 
{
30
 
    public:
31
 
 
32
 
        /**
33
 
         * Returns the manager for the panels
34
 
         * Must be initialized the a subclass as self() does not do any
35
 
         * initializing itself but merely return m_manager
36
 
         */
37
 
        static AbstractPanelManager* self() { return m_manager; }
38
 
 
39
 
        /**
40
 
         * Returns the next panel number in the stacking order
41
 
         */
42
 
        virtual int nextPanelOrder() = 0;
43
 
 
44
 
        /**
45
 
         * Given a preferred position, returns the position that the extension
46
 
         * should appear at when first created.
47
 
         *
48
 
         * @param preferred the position that this extension would start at
49
 
         *        given the option of doing so
50
 
         */
51
 
         virtual Plasma::Position initialPanelPosition(Plasma::Position preferred) = 0;
52
 
 
53
 
        /**
54
 
         * This method returns the rectangular area defining the available
55
 
         * desktop space available to this container after removing all reserved
56
 
         * spaces due to, for instance, other panels with a higher stacking
57
 
         * priority
58
 
         *
59
 
         * @param container the container
60
 
         * @param XineramaScreen the screen that this extension is on. Use
61
 
         *        Plasma::AllXineramaScreens to signal that it is not on any
62
 
         *        specific screen
63
 
         */
64
 
        virtual QRect workArea(ExtensionContainer* container,
65
 
                               int XineramaScreen) = 0;
66
 
 
67
 
        /**
68
 
         * Given an extension, this method returns whether it is being used as
69
 
         * a universal menu bar
70
 
         *
71
 
         * @param container the container to check for being the menu bar
72
 
         * @return returns true if container is a menu bar, otherwise false
73
 
         */
74
 
        virtual bool isMenuBar(const QWidget* panel) const = 0;
75
 
 
76
 
    protected:
77
 
        AbstractPanelManager();
78
 
        virtual ~AbstractPanelManager();
79
 
 
80
 
        static AbstractPanelManager* m_manager;
81
 
 
82
 
        class Private;
83
 
        Private* d;
84
 
};
85
 
 
86
 
#endif // multiple inclusion guard