Plasma::View Class Reference
A
QGraphicsView for a single
Containment.
More...
#include <Plasma/View>
List of all members.
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
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 114 of file view.cpp.
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 126 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 307 of file view.cpp.
- Returns:
- the containment associated with this view, or 0 if none is
Definition at line 252 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 175 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 184 of file view.cpp.
int Plasma::View::id |
( |
|
) |
const |
- Returns:
- the id of the View set in the constructor
Definition at line 313 of file view.cpp.
bool Plasma::View::isWallpaperEnabled |
( |
|
) |
const |
- Returns:
- whether or not containments should draw wallpaper
Definition at line 323 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 170 of file view.cpp.
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 190 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
- screen the physical screen number; -1 for no screen
- desktop the virtual desktop number, or -1 for all virtual desktops
Definition at line 146 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 synchronize the view's size with the containment's (this is the default behaviour), false to ignore containment size changes
Definition at line 328 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 318 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:
-
| name | the plugin name for the new containment. |
| args | argument list to pass to the containment |
Definition at line 257 of file view.cpp.
Swaps one containment with another.
- Parameters:
-
| existing | the existing containment to swap out |
| name | the plugin name for the new containment. |
| args | argument list to pass to the containment |
Definition at line 262 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 338 of file view.cpp.
bool Plasma::View::trackContainmentChanges |
( |
|
) |
|
- Returns:
- whether or not the view tracks changes to the containment
Definition at line 333 of file view.cpp.
The documentation for this class was generated from the following files: