INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

shortcutkey.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010  
00011 #ifndef HYDROQGUI_SHORTCUTKEY_H
00012 #define HYDROQGUI_SHORTCUTKEY_H
00013 
00014 #include <QAction>
00015 #include <QKeySequence>
00016 #include <QList>
00017 
00018 namespace hydroqguielementutil {
00019 
00020 namespace detail{ 
00021 
00033 class ShortcutKey : public QAction
00034 {
00035     Q_OBJECT
00036 public:
00037     
00040     ShortcutKey( QKeySequence keySequence, bool ownExclusively, QObject *parent );
00041     ~ShortcutKey() {};
00042     void subscribe( QObject *parent, QAction *action, bool ownExclusively );
00043     void unsubscribe( QObject *parent );
00044     QKeySequence key() { return keySequence_; };
00045     
00046     int numSubscribers() const { return actionMap_.size(); }
00047 
00048 public slots:
00049     void triggerElementActions();
00050     
00051 private:
00052     QKeySequence keySequence_;
00053     bool isOwnedExclusively_;
00054 
00055     // This actionMap_ is a QMultiMap: it allows multiple QAction's
00056     // to be associated with a single QObject.
00057     QMultiMap<QObject*,QAction*> actionMap_;
00058 };
00059 
00060 }
00061     
00062 }
00063 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5