this, SLOT(showContextMenu(const QPoint &)));
connect(tocTV, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(showContextMenu(const QPoint &)));
- connect(filterLE, SIGNAL(textEdited(QString)),
+ connect(filterLE, SIGNAL(textEdited(QString)),
this, SLOT(filterContents()));
init(QString());
std::string name = "context-toc-" + fromqstr(current_type_);
QMenu * menu = guiApp->menus().menu(toqstr(name), gui_view_);
if (!menu)
- return;
+ return;
menu->exec(mapToGlobal(pos));
}
TocItem const & item =
gui_view_.tocModels().currentItem(current_type_, index);
DocIterator const & dit = item.dit();
-
+
Inset * inset = 0;
- if (current_type_ == "label"
+ if (current_type_ == "label"
|| current_type_ == "graphics"
|| current_type_ == "citation"
|| current_type_ == "child")
else if (current_type_ == "branch"
|| current_type_ == "index"
|| current_type_ == "change"
- || current_type_ == "table"
+ || current_type_ == "table"
|| current_type_ == "listing"
|| current_type_ == "figure")
inset = &dit.inset();
tocTV->setEnabled(false);
tocTV->setUpdatesEnabled(false);
- QAbstractItemModel * toc_model =
+ QAbstractItemModel * toc_model =
gui_view_.tocModels().model(current_type_);
if (tocTV->model() != toc_model) {
tocTV->setModel(toc_model);
filterLE->text(), Qt::CaseInsensitive);
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--) {
QModelIndex index = indices[i];
if (!tocTV->isRowHidden(index.row(), index.parent())
///
void enableControls(bool enable = true);
///
- bool canOutline()
+ bool canOutline()
{ return current_type_ == "tableofcontents"; }
/// It is not possible to have synchronous navigation in a correct
/// 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
/// 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"; }
- ///
+ ///
bool isSortable()
{ return current_type_ != "tableofcontents"; }
///