X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiSelectionManager.h;h=1a9d1ce9bde751c375f7ab10bbf90f71c6c7fb5e;hb=5a46224f7311067cda747e0cae32d22dd919f179;hp=ddb7d2c665dcd85de5e28b4a5d694dc1b7f61733;hpb=1f8c4c3f269c504d0499ef1d8eeb569390682f71;p=lyx.git diff --git a/src/frontends/qt4/GuiSelectionManager.h b/src/frontends/qt4/GuiSelectionManager.h index ddb7d2c665..1a9d1ce9bd 100644 --- a/src/frontends/qt4/GuiSelectionManager.h +++ b/src/frontends/qt4/GuiSelectionManager.h @@ -20,6 +20,7 @@ class QListView; class QPushButton; class QVariant; class QAbstractItemView; +class QItemSelection; template class QMap; namespace lyx { @@ -60,7 +61,10 @@ public: /// to be used, for example, in displaying information about a /// highlighted item: should it be the highlighted available item /// or the highlighted selected item that is displayed? - bool selectedFocused() { return selectedHasFocus_; }; + bool selectedFocused() const { return selectedHasFocus_; }; + /// Returns the selected index. Note that this will depend upon + /// selectedFocused(). + QModelIndex getSelectedIndex() const; Q_SIGNALS: /// Emitted when the list of selected items has changed. @@ -103,9 +107,13 @@ protected: protected Q_SLOTS: /// - void availableChanged(const QModelIndex & idx, const QModelIndex &); + void availableChanged(QModelIndex const & idx, QModelIndex const &); /// - void selectedChanged(const QModelIndex & idx, const QModelIndex &); + void selectedChanged(QModelIndex const & idx, QModelIndex const &); + /// + void availableChanged(QItemSelection const & qis, QItemSelection const &); + /// + void selectedChanged(QItemSelection const & qis, QItemSelection const &); /// virtual void addPB_clicked(); /// @@ -115,12 +123,8 @@ protected Q_SLOTS: /// virtual void downPB_clicked(); /// - void availableLV_clicked(const QModelIndex &); - /// void availableLV_doubleClicked(const QModelIndex &); /// - void selectedLV_clicked(const QModelIndex &); - /// bool eventFilter(QObject *, QEvent *); private: