Move to QAbstractItemView

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31039 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2009-08-14 20:37:12 +00:00
parent 0008c148bb
commit 1f8c4c3f26
3 changed files with 9 additions and 5 deletions

View File

@ -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;

View File

@ -28,7 +28,7 @@ namespace lyx {
namespace frontend {
GuiSelectionManager::GuiSelectionManager(
QListView * avail,
QAbstractItemView * avail,
QListView * sel,
QPushButton * add,
QPushButton * del,

View File

@ -19,6 +19,7 @@ class QModelIndex;
class QListView;
class QPushButton;
class QVariant;
class QAbstractItemView;
template <class T, class U> 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<int, QVariant> const & itemData);
///
QListView * availableLV;
QAbstractItemView * availableLV;
///
QListView * selectedLV;
///