VirtualBox

Changeset 52181 in vbox


Ignore:
Timestamp:
Jul 25, 2014 12:24:50 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95232
Message:

FE/Qt: 7462: Action-pool interface cleanup/rework (part 01).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r52179 r52181  
    619619    if (m_pInstance == this)
    620620        m_pInstance = 0;
     621}
     622
     623UIActionPoolRuntime* UIActionPool::toRuntime()
     624{
     625    return qobject_cast<UIActionPoolRuntime*>(this);
     626}
     627
     628UIActionPoolSelector* UIActionPool::toSelector()
     629{
     630    return qobject_cast<UIActionPoolSelector*>(this);
    621631}
    622632
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r52152 r52181  
    2828class UIActionPolymorphic;
    2929class UIActionPool;
     30class UIActionPoolRuntime;
     31class UIActionPoolSelector;
    3032
    3133
     
    282284    static void createTemporary(UIActionPoolType type);
    283285
     286    /** Cast action-pool to Runtime one. */
     287    UIActionPoolRuntime* toRuntime();
     288    /** Cast action-pool to Selector one. */
     289    UIActionPoolSelector* toSelector();
     290
    284291    /** Returns action-pool type. */
    285292    UIActionPoolType type() const { return m_type; }
     
    290297    QList<UIAction*> actions() const { return m_pool.values(); }
    291298
     299    /** Hot-key processing delegate. */
     300    bool processHotKey(const QKeySequence &key);
     301
    292302    /** Returns extra-data ID to save keyboard shortcuts under. */
    293303    virtual QString shortcutsExtraDataID() const = 0;
     
    295305    /** Recreates menus. */
    296306    void recreateMenus() { createMenus(); }
    297 
    298     /** Hot-key processing delegate. */
    299     bool processHotKey(const QKeySequence &key);
    300307
    301308protected slots:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette