mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Whitespace
This commit is contained in:
parent
5aa342ed75
commit
0e740018ff
@ -86,7 +86,7 @@ TocWidget::TocWidget(GuiView & gui_view, QWidget * parent)
|
|||||||
this, SLOT(showContextMenu(const QPoint &)));
|
this, SLOT(showContextMenu(const QPoint &)));
|
||||||
connect(tocTV, SIGNAL(customContextMenuRequested(const QPoint &)),
|
connect(tocTV, SIGNAL(customContextMenuRequested(const QPoint &)),
|
||||||
this, SLOT(showContextMenu(const QPoint &)));
|
this, SLOT(showContextMenu(const QPoint &)));
|
||||||
connect(filterLE, SIGNAL(textEdited(QString)),
|
connect(filterLE, SIGNAL(textEdited(QString)),
|
||||||
this, SLOT(filterContents()));
|
this, SLOT(filterContents()));
|
||||||
|
|
||||||
init(QString());
|
init(QString());
|
||||||
@ -98,7 +98,7 @@ void TocWidget::showContextMenu(const QPoint & pos)
|
|||||||
std::string name = "context-toc-" + fromqstr(current_type_);
|
std::string name = "context-toc-" + fromqstr(current_type_);
|
||||||
QMenu * menu = guiApp->menus().menu(toqstr(name), gui_view_);
|
QMenu * menu = guiApp->menus().menu(toqstr(name), gui_view_);
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
menu->exec(mapToGlobal(pos));
|
menu->exec(mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,9 +109,9 @@ Inset * TocWidget::itemInset() const
|
|||||||
TocItem const & item =
|
TocItem const & item =
|
||||||
gui_view_.tocModels().currentItem(current_type_, index);
|
gui_view_.tocModels().currentItem(current_type_, index);
|
||||||
DocIterator const & dit = item.dit();
|
DocIterator const & dit = item.dit();
|
||||||
|
|
||||||
Inset * inset = 0;
|
Inset * inset = 0;
|
||||||
if (current_type_ == "label"
|
if (current_type_ == "label"
|
||||||
|| current_type_ == "graphics"
|
|| current_type_ == "graphics"
|
||||||
|| current_type_ == "citation"
|
|| current_type_ == "citation"
|
||||||
|| current_type_ == "child")
|
|| current_type_ == "child")
|
||||||
@ -120,7 +120,7 @@ Inset * TocWidget::itemInset() const
|
|||||||
else if (current_type_ == "branch"
|
else if (current_type_ == "branch"
|
||||||
|| current_type_ == "index"
|
|| current_type_ == "index"
|
||||||
|| current_type_ == "change"
|
|| current_type_ == "change"
|
||||||
|| current_type_ == "table"
|
|| current_type_ == "table"
|
||||||
|| current_type_ == "listing"
|
|| current_type_ == "listing"
|
||||||
|| current_type_ == "figure")
|
|| current_type_ == "figure")
|
||||||
inset = &dit.inset();
|
inset = &dit.inset();
|
||||||
@ -415,7 +415,7 @@ void TocWidget::updateViewForce()
|
|||||||
tocTV->setEnabled(false);
|
tocTV->setEnabled(false);
|
||||||
tocTV->setUpdatesEnabled(false);
|
tocTV->setUpdatesEnabled(false);
|
||||||
|
|
||||||
QAbstractItemModel * toc_model =
|
QAbstractItemModel * toc_model =
|
||||||
gui_view_.tocModels().model(current_type_);
|
gui_view_.tocModels().model(current_type_);
|
||||||
if (tocTV->model() != toc_model) {
|
if (tocTV->model() != toc_model) {
|
||||||
tocTV->setModel(toc_model);
|
tocTV->setModel(toc_model);
|
||||||
@ -470,7 +470,7 @@ void TocWidget::filterContents()
|
|||||||
filterLE->text(), Qt::CaseInsensitive);
|
filterLE->text(), Qt::CaseInsensitive);
|
||||||
tocTV->setRowHidden(index.row(), index.parent(), !matches);
|
tocTV->setRowHidden(index.row(), index.parent(), !matches);
|
||||||
}
|
}
|
||||||
// recursively unhide parents of unhidden children
|
// recursively unhide parents of unhidden children
|
||||||
for (int i = size - 1; i >= 0; i--) {
|
for (int i = size - 1; i >= 0; i--) {
|
||||||
QModelIndex index = indices[i];
|
QModelIndex index = indices[i];
|
||||||
if (!tocTV->isRowHidden(index.row(), index.parent())
|
if (!tocTV->isRowHidden(index.row(), index.parent())
|
||||||
|
@ -74,15 +74,15 @@ private:
|
|||||||
///
|
///
|
||||||
void enableControls(bool enable = true);
|
void enableControls(bool enable = true);
|
||||||
///
|
///
|
||||||
bool canOutline()
|
bool canOutline()
|
||||||
{ return current_type_ == "tableofcontents"; }
|
{ return current_type_ == "tableofcontents"; }
|
||||||
/// It is not possible to have synchronous navigation in a correct
|
/// It is not possible to have synchronous navigation in a correct
|
||||||
/// and efficient way with the label and change type because Toc::item()
|
/// and efficient way with the label and change type because Toc::item()
|
||||||
/// does a linear search. Even when fixed, it might even not be desirable
|
/// does a linear search. Even when fixed, it might even not be desirable
|
||||||
/// to do so if we want to support drag&drop of labels and references.
|
/// to do so if we want to support drag&drop of labels and references.
|
||||||
bool canNavigate()
|
bool canNavigate()
|
||||||
{ return current_type_ != "label" && current_type_ != "change"; }
|
{ return current_type_ != "label" && current_type_ != "change"; }
|
||||||
///
|
///
|
||||||
bool isSortable()
|
bool isSortable()
|
||||||
{ return current_type_ != "tableofcontents"; }
|
{ return current_type_ != "tableofcontents"; }
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user