mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
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:
parent
0008c148bb
commit
1f8c4c3f26
@ -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;
|
||||
|
@ -28,7 +28,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiSelectionManager::GuiSelectionManager(
|
||||
QListView * avail,
|
||||
QAbstractItemView * avail,
|
||||
QListView * sel,
|
||||
QPushButton * add,
|
||||
QPushButton * del,
|
||||
|
@ -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;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user