KDE 4.9 PyKDE API Reference

- KDE's Python API

# KToggleFullScreenAction Class Reference

`from PyKDE4.kdeui import *`

Inherits: KToggleAction → KAction → QWidgetAction → QAction → QObject

## Detailed Description

An action for switching between to/from full screen mode. Note that QWidget.isFullScreen() may reflect the new or the old state depending on how the action was triggered (by the application or from the window manager). Also don't try to track the window state yourself. Rely on this action's state (isChecked()) instead.

Important: If you need to set/change the fullscreen state manually, use KToggleFullScreenAction.setFullScreen() or a similar function, do not call directly the slot connected to the toggled() signal. The slot still needs to explicitly set the window state though.

Note: Do NOT use QWidget.showFullScreen() or QWidget.showNormal(). They have several side-effects besides just switching the fullscreen state (for example, showNormal() resets all window states, not just fullscreen). Use the KToggleFullScreenAction.setFullScreen() helper function.

## Methods

| __init__ (self, QObject parent)
| __init__ (self, QWidget window, QObject parent)
bool | eventFilter (self, QObject object, QEvent event)
| setWindow (self, QWidget window)

## Static Methods

| setFullScreen (QWidget window, bool set)

## Method Documentation

__init__ | ( | self, |
|  | QObject | parent
| ) |  |  |

Create a KToggleFullScreenAction. Call setWindow() to associate this action with a window.

Parameters:

  | parent | This action's parent object.

__init__ | ( | self, |
|  | QWidget | window,
|  | QObject | parent
| ) |  |  |

Create a KToggleFullScreenAction

Parameters:

  | window | the window that will switch to/from full screen mode
  | parent | This action's parent object.

bool eventFilter | ( | self, |
|  | QObject | object,
|  | QEvent | event
| ) |  |  |

setWindow | ( | self, |
|  | QWidget | window
| ) |  |  |

Sets the window that will be related to this action.

## Static Method Documentation

setFullScreen | ( | QWidget | window,
|  | bool | set
| ) |  |  |

Helper function to set or reset the fullscreen state of a window. Use this function rather than showFullScreen()/showNormal() QWidget functions.

Since:
  4.0.3