• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

Plasma::View

Plasma::View Class Reference

#include <view.h>

Inheritance diagram for Plasma::View:

Inheritance graph
[legend]

List of all members.


Detailed Description

A QGraphicsView for Plasma::Applets.

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 44 of file view.h.


Public Slots

virtual void setContainment (Containment *containment)

Signals

void sceneRectAboutToChange ()
void sceneRectChanged ()

Public Member Functions

Containment * containment () const
int desktop () const
int effectiveDesktop () const
int id () const
bool isWallpaperEnabled () const
int screen () const
void setDesktop (int desktop)
void setScreen (int screen)
void setTrackContainmentChanges (bool trackChanges)
void setWallpaperEnabled (bool draw)
bool trackContainmentChanges ()
 View (Containment *containment, int viewId, QWidget *parent=0)
 View (Containment *containment, QWidget *parent=0)
 ~View ()

Static Public Member Functions

static View * topLevelViewAt (const QPoint &pos)

Protected Member Functions

KConfigGroup config () const

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.

  • containment the containment to center the view on
  • parent the parent object for this view

Definition at line 106 of file view.cpp.

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

Constructs a view for a given contanment.

  • containment the containment to center the view on
  • viewId the id to assign to this view
  • parent the parent object for this view

Definition at line 116 of file view.cpp.

Plasma::View::~View (  ) 

Definition at line 127 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 238 of file view.cpp.

Containment * Plasma::View::containment (  )  const

Returns:
the containment associated with this view, or 0 if none is

Definition at line 233 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 168 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 173 of file view.cpp.

int Plasma::View::id (  )  const

Returns:
the id of the View set in the constructor

Definition at line 244 of file view.cpp.

bool Plasma::View::isWallpaperEnabled (  )  const

Returns:
whether or not containments should draw wallpaper

Definition at line 254 of file view.cpp.

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 149 of file view.cpp.

void Plasma::View::setContainment ( Containment *  containment  )  [virtual, slot]

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

  • containment the containment to center the view on

Definition at line 178 of file view.cpp.

void Plasma::View::setDesktop ( int  desktop  ) 

Sets which virtual desktop this view is asociated with, if any.

  • desktop a valid desktop number, -1 for all desktops, less than -1 for none

Definition at line 158 of file view.cpp.

void Plasma::View::setScreen ( int  screen  ) 

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

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

  • screen the xinerama screen number; -1 for no screen

Definition at line 132 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.

  • trackChanges true to syncronize the view's size with the containment's (this is the default behaviour), false to ignore containment size changes

Definition at line 259 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 249 of file view.cpp.

View * Plasma::View::topLevelViewAt ( const QPoint &  pos  )  [static]

Parameters:
pos the position in screen coordinates.

Returns:
the Plasma::View that is at position pos.

Definition at line 269 of file view.cpp.

bool Plasma::View::trackContainmentChanges (  ) 

Returns:
whether or not the view tracks changes to the containment

Definition at line 264 of file view.cpp.


The documentation for this class was generated from the following files:
  • view.h
  • view.cpp

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal