From 1f8c4c3f269c504d0499ef1d8eeb569390682f71 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Fri, 14 Aug 2009 20:37:12 +0000 Subject: [PATCH] Move to QAbstractItemView git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31039 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 7 +++++-- src/frontends/qt4/GuiSelectionManager.cpp | 2 +- src/frontends/qt4/GuiSelectionManager.h | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index b62b415c22..445f080fe4 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1663,8 +1663,11 @@ void GuiDocument::updateModuleInfo() //Module description bool const focus_on_selected = selectionManager->selectedFocused(); - QListView const * const lv = - focus_on_selected ? modulesModule->selectedLV : modulesModule->availableLV; + QAbstractItemView * lv; + if (focus_on_selected) + lv = modulesModule->selectedLV; + else + lv= modulesModule->availableLV; if (lv->selectionModel()->selectedIndexes().isEmpty()) { modulesModule->infoML->document()->clear(); return; diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index 5284d27d6e..c1d33b4178 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -28,7 +28,7 @@ namespace lyx { namespace frontend { GuiSelectionManager::GuiSelectionManager( - QListView * avail, + QAbstractItemView * avail, QListView * sel, QPushButton * add, QPushButton * del, diff --git a/src/frontends/qt4/GuiSelectionManager.h b/src/frontends/qt4/GuiSelectionManager.h index 2e9c747363..ddb7d2c665 100644 --- a/src/frontends/qt4/GuiSelectionManager.h +++ b/src/frontends/qt4/GuiSelectionManager.h @@ -19,6 +19,7 @@ class QModelIndex; class QListView; class QPushButton; class QVariant; +class QAbstractItemView; template class QMap; namespace lyx { @@ -39,7 +40,7 @@ class GuiSelectionManager : public QObject public: /// GuiSelectionManager( - QListView * availableLV, + QAbstractItemView * availableLV, QListView * selectedLV, QPushButton * addPB, QPushButton * delPB, @@ -84,7 +85,7 @@ protected: /// bool insertRowToSelected(int i, QMap const & itemData); /// - QListView * availableLV; + QAbstractItemView * availableLV; /// QListView * selectedLV; ///