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

« back to all changes in this revision

Viewing changes to plasma/netbook/shell/netcorona.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
 *   Copyright 2008 Aaron Seigo <aseigo@kde.org>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU Library General Public License as
 
6
 *   published by the Free Software Foundation; either version 2, or
 
7
 *   (at your option) any later version.
 
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 General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU 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 NETVCORONA_H
 
21
#define NETVCORONA_H
 
22
 
 
23
#include <QtGui/QGraphicsScene>
 
24
 
 
25
#include <Plasma/Corona>
 
26
 
 
27
namespace Plasma
 
28
{
 
29
    class Applet;
 
30
} // namespace Plasma
 
31
 
 
32
/**
 
33
 * @short A Corona with desktop-y considerations
 
34
 */
 
35
class NetCorona : public Plasma::Corona
 
36
{
 
37
    Q_OBJECT
 
38
 
 
39
public:
 
40
    NetCorona(QObject * parent);
 
41
 
 
42
    /**
 
43
     * Loads the default (system wide) layout for this user
 
44
     **/
 
45
    void loadDefaultLayout();
 
46
 
 
47
    Plasma::Containment *findFreeContainment() const;
 
48
 
 
49
    bool loadDefaultLayoutScripts();
 
50
    void processUpdateScripts();
 
51
 
 
52
    virtual int numScreens() const;
 
53
    virtual QRect screenGeometry(int id) const;
 
54
    virtual QRegion availableScreenRegion(int id) const;
 
55
 
 
56
protected Q_SLOTS:
 
57
    void screenResized(int);
 
58
    void evaluateScripts(const QStringList &scripts);
 
59
    void printScriptError(const QString &error);
 
60
    void printScriptMessage(const QString &error);
 
61
    void containmentAdded(Plasma::Containment *cont);
 
62
    void addPage();
 
63
 
 
64
private:
 
65
    void init();
 
66
    Plasma::Applet *loadDefaultApplet(const QString &pluginName, Plasma::Containment *c);
 
67
 
 
68
    int m_numScreens;
 
69
};
 
70
 
 
71
#endif
 
72
 
 
73