Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Action Class Reference

A specialized QWidgetAction, enhanced by some KDE features. More...

#include </tmp/quassel/src/uisupport/action.h>

Signals

void triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)

Public Member Functions

 Q_FLAGS (ShortcutType) public
 Q_DECLARE_FLAGS (ShortcutTypes, ShortcutType) explicit Action(QObject *parent)
 Action (const QString &text, QObject *parent, const QObject *receiver=0, const char *slot=0, const QKeySequence &shortcut=0)
 Action (const QIcon &icon, const QString &text, QObject *parent, const QObject *receiver=0, const char *slot=0, const QKeySequence &shortcut=0)
QKeySequence shortcut (ShortcutTypes types=ActiveShortcut) const
void setShortcut (const QShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void setShortcut (const QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
bool isShortcutConfigurable () const
void setShortcutConfigurable (bool configurable)

Properties

QKeySequence shortcut
bool shortcutConfigurable

Private Slots

void slotTriggered ()

Private Member Functions

void init ()

Detailed Description

A specialized QWidgetAction, enhanced by some KDE features.

This declares/implements a subset of KAction's API (notably we've left out global shortcuts for now), which should make it easy to plug in KDE support later on.

Definition at line 35 of file action.h.

Constructor & Destructor Documentation

Action ( const QString &  text,
QObject *  parent,
const QObject *  receiver = 0,
const char *  slot = 0,
const QKeySequence &  shortcut = 0 
)

Definition at line 38 of file action.cpp.

Action ( const QIcon &  icon,
const QString &  text,
QObject *  parent,
const QObject *  receiver = 0,
const char *  slot = 0,
const QKeySequence &  shortcut = 0 
)

Definition at line 53 of file action.cpp.

Member Function Documentation

Q_FLAGS ( ShortcutType  )
inline

Definition at line 41 of file action.h.

Q_DECLARE_FLAGS ( ShortcutTypes  ,
ShortcutType   
)
QKeySequence shortcut ( ShortcutTypes  types = ActiveShortcut) const

Definition at line 98 of file action.cpp.

void setShortcut ( const QShortcut &  shortcut,
ShortcutTypes  type = ShortcutTypes(ActiveShortcut | DefaultShortcut) 
)
void setShortcut ( const QKeySequence &  shortcut,
ShortcutTypes  type = ShortcutTypes(ActiveShortcut | DefaultShortcut) 
)

Definition at line 115 of file action.cpp.

References setShortcut().

bool isShortcutConfigurable ( ) const

Definition at line 86 of file action.cpp.

Referenced by ShortcutsModel::data(), and ActionCollection::writeSettings().

void setShortcutConfigurable ( bool  configurable)

Definition at line 92 of file action.cpp.

Referenced by ChatViewSearchBar::ChatViewSearchBar().

void triggered ( Qt::MouseButtons  buttons,
Qt::KeyboardModifiers  modifiers 
)
signal

Referenced by init(), and slotTriggered().

void init ( )
private

Definition at line 72 of file action.cpp.

References slotTriggered(), and triggered().

void slotTriggered ( )
privateslot

Definition at line 80 of file action.cpp.

References triggered().

Referenced by init().

Property Documentation

bool shortcutConfigurable
readwrite

Definition at line 40 of file action.h.


The documentation for this class was generated from the following files: