1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
// Copyright 2008 Simon Edwards <simon@simonzone.com>
// Generated by twine
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details
// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Plasma
{
class Corona : QGraphicsScene
{
%TypeHeaderCode
#include <plasma/corona.h>
%End
public:
explicit Corona (QObject* parent /TransferThis/ = 0);
void setAppletMimeType (const QString& mimetype);
QString appletMimeType ();
QList<Plasma::Containment*> containments () const;
void clearContainments ();
KSharedConfig::Ptr config () const;
Plasma::Containment* addContainment (const QString& name, const QVariantList& args = QVariantList());
Plasma::Containment* containmentForScreen (int screen, int desktop = -1) const;
void addOffscreenWidget (QGraphicsWidget* widget);
void removeOffscreenWidget (QGraphicsWidget* widget);
QList<QGraphicsWidget*> offscreenWidgets () const;
virtual int numScreens () const;
virtual QRect screenGeometry (int id) const;
virtual QRegion availableScreenRegion (int id) const;
QPoint popupPosition (const QGraphicsItem* item, const QSize& size);
QList<Plasma::Location> freeEdges (int screen) const;
QAction* action (QString name) const;
void addAction (QString name, QAction* action);
QList<QAction*> actions () const;
void enableAction (const QString& name, bool enable);
void updateShortcuts ();
void addShortcuts (KActionCollection* newShortcuts);
KAction* addAction (QString name);
void initializeLayout (const QString& config = QString());
void loadLayout (const QString& config = QString());
void saveLayout (const QString& config = QString()) const;
Plasma::ImmutabilityType immutability () const;
void setImmutability (const Plasma::ImmutabilityType immutable);
void requestConfigSync ();
void requireConfigSync ();
signals:
void containmentAdded (Plasma::Containment* containment);
void screenOwnerChanged (int wasScreen, int isScreen, Plasma::Containment* containment);
void releaseVisualFocus ();
void configSynced ();
void availableScreenRegionChanged ();
void immutabilityChanged (Plasma::ImmutabilityType immutability);
void shortcutsChanged ();
protected:
virtual void loadDefaultLayout ();
Plasma::Containment* addContainmentDelayed (const QString& name, const QVariantList& args = QVariantList());
void dragEnterEvent (QGraphicsSceneDragDropEvent* event);
void dragLeaveEvent (QGraphicsSceneDragDropEvent* event);
void dragMoveEvent (QGraphicsSceneDragDropEvent* event);
public:
~Corona ();
QPoint popupPosition (const QGraphicsItem* item, const QSize& size, Qt::AlignmentFlag alignment);
void setContainmentActionsDefaults (Plasma::Containment::Type containmentType, const Plasma::ContainmentActionsPluginsConfig& config);
Plasma::ContainmentActionsPluginsConfig containmentActionsDefaults (Plasma::Containment::Type containmentType);
void setDialogManager (Plasma::AbstractDialogManager* manager);
Plasma::AbstractDialogManager* dialogManager ();
QList<Plasma::Containment*> importLayout (const KConfigBase& config);
void layoutContainments ();
protected:
void mapAnimation (Plasma::Animator::Animation from, Plasma::Animator::Animation to);
void mapAnimation (Plasma::Animator::Animation from, const QString& to);
public:
Plasma::Containment* containmentForScreen (int screen, int desktop, const QString& defaultPluginIfNonExistent, const QVariantList& defaultArgs = QVariantList());
QString preferredToolBoxPlugin (const Plasma::Containment::Type type) const;
QList<Plasma::Containment*> importLayout (const KConfigGroup& config);
void exportLayout (KConfigGroup& config, QList<Plasma::Containment*> containments);
protected:
void setPreferredToolBoxPlugin (const Plasma::Containment::Type type, const QString& plugin);
public:
QString defaultContainmentPlugin () const;
protected:
void setDefaultContainmentPlugin (const QString& name);
};
// Corona
};
// Plasma
|