void QTocDialog::selectionChanged(const QModelIndex & current,
- const QModelIndex & previous)
+ const QModelIndex & /*previous*/)
{
lyxerr[Debug::GUI]
- << "selectionChanged index " << current.row() << ", " << current.column()
+ << "selectionChanged index " << current.row()
+ << ", " << current.column()
<< endl;
form_->goTo(current);
}
-void QTocDialog::on_tocTV_clicked(const QModelIndex & index )
-{
- lyxerr[Debug::GUI]
- << "on_tocTV_clicked index " << index.row() << ", " << index.column()
- << endl;
-
- form_->goTo(index);
-}
-
-
void QTocDialog::on_closePB_clicked()
{
accept();
void QTocDialog::on_moveUpPB_clicked()
{
- move(toc::UP);
+ enableButtons(false);
+ QModelIndex index = tocTV->selectionModel()->selectedIndexes()[0];
+ form_->goTo(index);
+ form_->outlineUp();
+ update();
}
void QTocDialog::on_moveDownPB_clicked()
{
- move(toc::DOWN);
+ enableButtons(false);
+ QModelIndex index = tocTV->selectionModel()->selectedIndexes()[0];
+ form_->goTo(index);
+ form_->outlineDown();
+ update();
}
void QTocDialog::on_moveInPB_clicked()
{
- move(toc::IN);
+ enableButtons(false);
+ QModelIndex index = tocTV->selectionModel()->selectedIndexes()[0];
+ form_->goTo(index);
+ form_->outlineIn();
+ update();
}
void QTocDialog::on_moveOutPB_clicked()
-{
- move(toc::OUT);
-}
-
-
-void QTocDialog::move(toc::OutlineOp const operation)
{
enableButtons(false);
QModelIndex index = tocTV->selectionModel()->selectedIndexes()[0];
form_->goTo(index);
- form_->move(operation);
- updateGui();
-// select(index);
-// enableButtons();
+ form_->outlineOut();
+ update();
}
tocTV->setModel(form_->tocModel());
tocTV->showColumn(0);
// hide the pointless QHeader for now
- // in the future, new columns may appear
+ // in the future, new columns may appear
// like labels, bookmarks, etc...
// tocTV->header()->hide();
tocTV->header()->setVisible(true);
} // namespace frontend
} // namespace lyx
+
+#include "QTocDialog_moc.cpp"