compile fies, tiny QToc improvement

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4734 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-07-21 18:13:13 +00:00
parent 16668d1632
commit 35c2e2d11a
5 changed files with 12 additions and 43 deletions

View File

@ -1,3 +1,8 @@
2002-07-21 John Levon <moz@compsoc.man.ac.uk>
* QToc.h:
* QToc.C: compile fixes, default to depth_(1)
2002-07-21 John Levon <moz@compsoc.man.ac.uk>
* Menubar_pimpl.C: change for removed menubar stuff

View File

@ -75,41 +75,6 @@ void Menubar::Pimpl::makeMenu(QMenuData * parent, MenuItem const & menu)
}
void Menubar::Pimpl::set(string const & menu_name)
{
lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set "
<< "for menu `" << menu_name << "'" << endl;
#if 0
if (menu_name != current_menu_name_) {
MenubarMap::iterator mbit = menubarmap_.find(menu_name);
if (mbit == menubarmap_.end()) {
lyxerr << "ERROR:set: Unknown menu `" << menu_name
<< "'" << endl;
return;
}
if (current_group_) {
lyxerr[Debug::GUI] << " hiding group "
<< current_group_ << endl;
fl_hide_object(current_group_);
}
lyxerr[Debug::GUI] << " showing group "
<< mbit->second << endl;
fl_show_object(mbit->second);
current_menu_name_ = menu_name;
current_group_ = mbit->second;
lyxerr[Debug::GUI] << "Menubar::Pimpl::set: Menubar set."
<< endl;
} else
lyxerr [Debug::GUI] << "Menubar::Pimpl::set: Nothing to do."
<< endl;
#endif
}
void Menubar::Pimpl::openByName(string const & name)
{
lyxerr << "Menubar::Pimpl::openByName: menu " << name << endl;

View File

@ -38,8 +38,6 @@ struct Menubar::Pimpl {
public:
///
Pimpl(LyXView *, MenuBackend const &);
///
void set(string const &);
/// Opens a top-level submenu given its name
void openByName(string const &);

View File

@ -36,7 +36,7 @@ using std::vector;
typedef Qt2CB<ControlToc, Qt2DB<QTocDialog> > base_class;
QToc::QToc(ControlToc & c, Dialogs &)
: base_class(c, _("Table of contents"))
: base_class(c, _("Table of contents")), depth_(1)
{}
@ -79,7 +79,7 @@ void QToc::updateToc(int newdepth)
char const * str = dialog_->typeCO->currentText().latin1();
string type (str ? str : "");
Buffer::SingleList const & contents = controller().getContents(type);
toc::Toc const & contents = controller().getContents(type);
// Check if all elements are the same.
if (newdepth == depth_ && toclist == contents) {
@ -107,7 +107,7 @@ void QToc::updateToc(int newdepth)
// rather than QListViewItem; and the TOC can move in and out an arbitrary number
// of levels
for (Buffer::SingleList::const_iterator iter = toclist.begin();
for (toc::Toc::const_iterator iter = toclist.begin();
iter != toclist.end(); ++iter) {
if (iter->depth == curdepth) {
// insert it after the last one we processed
@ -155,7 +155,7 @@ void QToc::updateToc(int newdepth)
void QToc::select(string const & text)
{
Buffer::SingleList::const_iterator iter = toclist.begin();
toc::Toc::const_iterator iter = toclist.begin();
for (; iter != toclist.end(); ++iter) {
if (iter->str == text)
@ -168,7 +168,7 @@ void QToc::select(string const & text)
return;
}
controller().Goto(iter->par->id());
controller().goTo(*iter);
}

View File

@ -16,6 +16,7 @@
#endif
#include "ControlToc.h"
#include "toc.h"
#include "Qt2Base.h"
@ -52,7 +53,7 @@ private:
virtual void build_dialog();
/// the toc list
Buffer::SingleList toclist;
toc::Toc toclist;
/// depth of list shown
int depth_;