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

KDEUI

KPasteTextAction Class Reference

An action for pasting text from the clipboard. More...

#include <kpastetextaction.h>

Inheritance diagram for KPasteTextAction:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 KPasteTextAction (const KIcon &icon, const QString &text, QObject *parent)
 KPasteTextAction (const QString &text, QObject *parent)
 KPasteTextAction (QObject *parent)
void setMixedMode (bool mode)
virtual ~KPasteTextAction ()

Detailed Description

An action for pasting text from the clipboard.

It's useful for text handling applications as when plugged into a toolbar it provides a menu with the clipboard history if klipper is running. If klipper is not running, the menu has only one item: the current clipboard content.

Definition at line 42 of file kpastetextaction.h.


Constructor & Destructor Documentation

KPasteTextAction::KPasteTextAction ( QObject *  parent  )  [explicit]

Constructs an action with the specified parent.

Parameters:
parent The parent of this action.

Definition at line 63 of file kpastetextaction.cpp.

KPasteTextAction::KPasteTextAction ( const QString &  text,
QObject *  parent 
)

Constructs an action with text; a shortcut may be specified by the ampersand character (e.g.

"&amp;Option" creates a shortcut with key O )

This is the most common KAction used when you do not have a corresponding icon (note that it won't appear in the current version of the "Edit ToolBar" dialog, because an action needs an icon to be plugged in a toolbar...).

Parameters:
text The text that will be displayed.
parent The parent of this action.

Definition at line 69 of file kpastetextaction.cpp.

KPasteTextAction::KPasteTextAction ( const KIcon &  icon,
const QString &  text,
QObject *  parent 
)

Constructs an action with text and an icon; a shortcut may be specified by the ampersand character (e.g.

"&amp;Option" creates a shortcut with key O )

This is the other common KAction used. Use it when you do have a corresponding icon.

Parameters:
icon The icon to display.
text The text that will be displayed.
parent The parent of this action.

Definition at line 76 of file kpastetextaction.cpp.

KPasteTextAction::~KPasteTextAction (  )  [virtual]

Definition at line 90 of file kpastetextaction.cpp.


Member Function Documentation

void KPasteTextAction::setMixedMode ( bool  mode  ) 

Controls the behavior of the clipboard history menu popup.

Parameters:
mode If false and the clipboard contains a non-text object the popup menu with the clipboard history will appear immediately as the user clicks the toolbar action; if true, the action works like the standard paste action even if the current clipboard object is not text. Default value is true.

Definition at line 95 of file kpastetextaction.cpp.


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

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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