• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • View
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Plasma::View Class Reference

#include <Plasma/View>

Inheritance diagram for Plasma::View:
Inheritance graph
[legend]

Public Slots

virtual void setContainment (Plasma::Containment *containment)
 

Signals

void lostContainment ()
 
void sceneRectAboutToChange ()
 
void sceneRectChanged ()
 

Public Member Functions

 View (Containment *containment, QWidget *parent=0)
 
 View (Containment *containment, int viewId, QWidget *parent=0)
 
 ~View ()
 
Containment * containment () const
 
int desktop () const
 
int effectiveDesktop () const
 
int id () const
 
bool isWallpaperEnabled () const
 
int screen () const
 
void setScreen (int screen, int desktop=-1)
 
void setTrackContainmentChanges (bool trackChanges)
 
void setWallpaperEnabled (bool draw)
 
Containment * swapContainment (Plasma::Containment *existing, const QString &name, const QVariantList &args=QVariantList())
 
Containment * swapContainment (const QString &name, const QVariantList &args=QVariantList())
 
bool trackContainmentChanges ()
 

Static Public Member Functions

static View * topLevelViewAt (const QPoint &pos)
 

Protected Member Functions

KConfigGroup config () const
 
void configNeedsSaving () const
 

Detailed Description

A QGraphicsView for a single Containment.

Each View is associated with a Plasma::Containment and tracks geometry changes, maps to the current desktop (if any) among other helpful utilities. It isn't stricly required to use a Plasma::View with Plasma enabled applications, but it can make some things easier.

Definition at line 47 of file view.h.

Constructor & Destructor Documentation

Plasma::View::View ( Containment *  containment,
QWidget *  parent = 0 
)
explicit

Constructs a view for a given contanment.

An Id is automatically assigned to the View.

Parameters
containmentthe containment to center the view on
parentthe parent object for this view

Definition at line 139 of file view.cpp.

Plasma::View::View ( Containment *  containment,
int  viewId,
QWidget *  parent = 0 
)

Constructs a view for a given contanment.

Parameters
containmentthe containment to center the view on
viewIdthe id to assign to this view
parentthe parent object for this view

Definition at line 152 of file view.cpp.

Plasma::View::~View ( )

Definition at line 165 of file view.cpp.

Member Function Documentation

KConfigGroup Plasma::View::config ( ) const
protected
Returns
a KConfigGroup in the application's config file unique to the view

Definition at line 370 of file view.cpp.

void Plasma::View::configNeedsSaving ( ) const
protected

Requests that the config be synchronized to disk.

Definition at line 376 of file view.cpp.

Containment * Plasma::View::containment ( ) const
Returns
the containment associated with this view, or 0 if none is

Definition at line 303 of file view.cpp.

int Plasma::View::desktop ( ) const

The virtual desktop this view is associated with.

Returns
the desktop number, -1 for all desktops and less than -1 for none

Definition at line 212 of file view.cpp.

int Plasma::View::effectiveDesktop ( ) const

The virtual desktop this view is actually being viewed on.

Returns
the desktop number (always valid, never < 0)

Definition at line 221 of file view.cpp.

int Plasma::View::id ( ) const
Returns
the id of the View set in the constructor

Definition at line 387 of file view.cpp.

bool Plasma::View::isWallpaperEnabled ( ) const
Returns
whether or not containments should draw wallpaper

Definition at line 397 of file view.cpp.

void Plasma::View::lostContainment ( )
signal

This is emitted after the containment is destroyed, for views that need to do something about it (like find a new one).

void Plasma::View::sceneRectAboutToChange ( )
signal

This signal is emitted whenever the containment being viewed has changed its geometry, but before the View has shifted the viewd scene rect to the new geometry.

This is useful for Views which want to keep their rect() in sync with the containment'sa

void Plasma::View::sceneRectChanged ( )
signal

This signal is emitted whenever the containment being viewed has changed its geometry, and after the View has shifted the viewd scene rect to the new geometry.

This is useful for Views which want to keep their rect() in sync with the containment's.

int Plasma::View::screen ( ) const

Returns the screen this view is associated with.

Returns
the xinerama screen number, or -1 for none

Definition at line 207 of file view.cpp.

void Plasma::View::setContainment ( Plasma::Containment *  containment)
virtualslot

Sets the containment for this view, which will also cause the view to track the geometry of the containment.

Parameters
containmentthe containment to center the view on

Definition at line 227 of file view.cpp.

void Plasma::View::setScreen ( int  screen,
int  desktop = -1 
)

Sets which screen this view is associated with, if any.

This will also set the containment if a valid screen is specified

Parameters
screenthe physical screen number; -1 for no screen
desktopthe virtual desktop number, or -1 for all virtual desktops

Definition at line 173 of file view.cpp.

void Plasma::View::setTrackContainmentChanges ( bool  trackChanges)

Set whether or not the view should adjust its size when the associated containment does.

Parameters
trackChangestrue to synchronize the view's size with the containment's (this is the default behaviour), false to ignore containment size changes

Definition at line 402 of file view.cpp.

void Plasma::View::setWallpaperEnabled ( bool  draw)

Sets whether or not to draw the containment wallpaper when painting on this item.

Definition at line 392 of file view.cpp.

Containment * Plasma::View::swapContainment ( Plasma::Containment *  existing,
const QString &  name,
const QVariantList &  args = QVariantList() 
)

Swaps one containment with another.

Parameters
existingthe existing containment to swap out
namethe plugin name for the new containment.
argsargument list to pass to the containment
Returns
the new containment

Definition at line 313 of file view.cpp.

Containment * Plasma::View::swapContainment ( const QString &  name,
const QVariantList &  args = QVariantList() 
)

Swap the containment for this view, which will also cause the view to track the geometry of the containment.

Parameters
namethe plugin name for the new containment.
argsargument list to pass to the containment

Definition at line 308 of file view.cpp.

View * Plasma::View::topLevelViewAt ( const QPoint &  pos)
static
Parameters
posthe position in screen coordinates.
Returns
the Plasma::View that is at position pos.

Definition at line 412 of file view.cpp.

bool Plasma::View::trackContainmentChanges ( )
Returns
whether or not the view tracks changes to the containment

Definition at line 407 of file view.cpp.


The documentation for this class was generated from the following files:
  • view.h
  • view.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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