From 4ef66c42fc53b51f047ea395b9c2e9acfed456bf Mon Sep 17 00:00:00 2001 From: John Levon Date: Sun, 21 Jul 2002 23:08:30 +0000 Subject: [PATCH] implement openLayoutList git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4738 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/TODO | 3 +-- src/frontends/qt2/Toolbar_pimpl.C | 11 ++++++++--- src/frontends/qt2/Toolbar_pimpl.h | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 90fb92768b..6fbf749eff 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-07-22 John Levon + + * Toolbar_pimpl.h: + * Toolbar_pimpl.C: implement getLayoutList() + 2002-07-21 Jean-Marc Lasgouttes * Toolbar_pimpl.C: use BufferParams::getLyXTextClass diff --git a/src/frontends/qt2/TODO b/src/frontends/qt2/TODO index 424e7b7bd9..d8cc6d05cc 100644 --- a/src/frontends/qt2/TODO +++ b/src/frontends/qt2/TODO @@ -124,6 +124,5 @@ QtView Toolbar_pimpl - mathed symbols (*) - - openLayoutList() (remove ?) - - ::set() ??? + - set() ?? - push() ?? diff --git a/src/frontends/qt2/Toolbar_pimpl.C b/src/frontends/qt2/Toolbar_pimpl.C index a22351fecf..253c96c1b4 100644 --- a/src/frontends/qt2/Toolbar_pimpl.C +++ b/src/frontends/qt2/Toolbar_pimpl.C @@ -84,6 +84,13 @@ QPixmap getIconPixmap(int action) } // namespace anon +class QLComboBox : public QComboBox { +public: + QLComboBox(QWidget * parent) : QComboBox(parent) {} + void popup() { QComboBox::popup(); } +}; + + Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs &, int, int) : owner_(static_cast(o)), combo_(0) @@ -213,9 +220,7 @@ void Toolbar::Pimpl::clearLayoutList() void Toolbar::Pimpl::openLayoutList() { -#if 0 // popup() is protected combo_->popup(); -#endif } @@ -239,7 +244,7 @@ void Toolbar::Pimpl::add(int action, bool) toolbars_.push_back(new QToolBar(owner_)); break; case ToolbarDefaults::LAYOUTS: { - combo_ = new QComboBox(toolbars_.back()); + combo_ = new QLComboBox(toolbars_.back()); QSizePolicy p(QSizePolicy::Minimum, QSizePolicy::Fixed); combo_->setSizePolicy(p); combo_->setFocusPolicy(QWidget::TabFocus); diff --git a/src/frontends/qt2/Toolbar_pimpl.h b/src/frontends/qt2/Toolbar_pimpl.h index 7e21028cf4..974b37b772 100644 --- a/src/frontends/qt2/Toolbar_pimpl.h +++ b/src/frontends/qt2/Toolbar_pimpl.h @@ -28,7 +28,7 @@ class QtView; class QToolBar; -class QComboBox; +class QLComboBox; class ToolbarProxy; struct Toolbar::Pimpl { @@ -77,7 +77,7 @@ private: std::vector toolbars_; - QComboBox * combo_; + QLComboBox * combo_; typedef std::map ButtonMap;