]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiSelectionManager.h
No need (any longer?) to create a new view for lyxfiles-open
[lyx.git] / src / frontends / qt / GuiSelectionManager.h
index 9875396864da53701896d58cc226f99cd6cdeceb..905b2599044e260e6245152cc59bed9150733147 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  * \author Et Alia
  *
  * Full author contact details are available in file CREDITS.
@@ -15,9 +15,7 @@
 #include <QObject>
 
 class QAbstractItemModel;
-class QAbstractListModel;
 class QModelIndex;
-class QListView;
 class QPushButton;
 class QVariant;
 class QAbstractItemView;
@@ -31,7 +29,7 @@ namespace frontend {
  *  of items from a list of available items. Adapted from code originally
  *  written for GuiCitationDialog.
  *  Note that this is a not a QWidget, though it could be converted to
- *  one. Rather, the managed widgets---see constructor for descripton
+ *  one. Rather, the managed widgets---see constructor for description
  *  of them---should be created independently, and then passed to the
  *  constructor.
  */
@@ -67,6 +65,8 @@ public:
        /// Returns the selected index. Note that this will depend upon
        /// selectedFocused().
        QModelIndex getSelectedIndex(int const c = 0) const;
+       ///
+       void allowMultiSelection(bool b) { allow_multi_selection_ = b; }
 
 Q_SIGNALS:
        /// Emitted when the list of selected items has changed.
@@ -131,7 +131,7 @@ protected Q_SLOTS:
        ///
        void availableLV_doubleClicked(const QModelIndex &);
        ///
-       bool eventFilter(QObject *, QEvent *);
+       bool eventFilter(QObject *, QEvent *) override;
        ///
        void updateButtons();
 
@@ -148,6 +148,8 @@ private:
        bool selectedHasFocus_;
        ///
        int main_sel_col_;
+       ///
+       bool allow_multi_selection_;
 };
 
 } // namespace frontend