VirtualBox

Changeset 60495 in vbox for trunk/src


Ignore:
Timestamp:
Apr 14, 2016 1:56:52 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​bugref:7456: Port Forwarding UI: Cleanup/rework the QITableView.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.cpp

    r52730 r60495  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2010-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Local includes */
     22/* GUI includes: */
    2323# include "QITableView.h"
    2424
     
    3333void QITableView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
    3434{
     35    /* Notify listeners about index changed: */
    3536    emit sigCurrentChanged(current, previous);
     37    /* Call to base-class: */
    3638    QTableView::currentChanged(current, previous);
    3739}
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.h

    r55401 r60495  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2010-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef __QITableView_h__
    19 #define __QITableView_h__
     18#ifndef ___QITableView_h___
     19#define ___QITableView_h___
    2020
    21 /* Global includes */
     21/* Qt includes: */
    2222#include <QTableView>
    2323
    24 /* QITableView class which extends standard QTableView's functionality. */
    25 class QITableView: public QTableView
     24/** QTableView extension providing GUI with advanced functionality. */
     25class QITableView : public QTableView
    2626{
    2727    Q_OBJECT;
    2828
     29signals:
     30
     31    /** Notifies listeners about index changed from @a previous to @a current. */
     32    void sigCurrentChanged(const QModelIndex &current, const QModelIndex &previous);
     33
    2934public:
    3035
     36    /** Constructs table-view on the basis of passed @a pParent. */
    3137    QITableView(QWidget *pParent = 0);
    3238
    33 signals:
     39protected:
    3440
    35     void sigCurrentChanged(const QModelIndex &current, const QModelIndex &previous);
    36 
    37 protected slots:
    38 
    39     void currentChanged(const QModelIndex &current, const QModelIndex &previous);
     41    /** Handles index change from @a previous to @a current. */
     42    virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous) /* override */;
    4043};
    4144
    42 #endif /* __QITableView_h__ */
     45#endif /* !___QITableView_h___ */
    4346
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