mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Remove GuiToolbar * member from the LayoutBox ctor: Why should we limit a LayoutBox to the Toolbar and it doesn't even have to know where it is.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31041 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7031c2bc5b
commit
7215b099d3
@ -228,6 +228,8 @@ void GuiToolbar::add(ToolbarItem const & item)
|
||||
break;
|
||||
case ToolbarItem::LAYOUTS:
|
||||
layout_ = new LayoutBox(this, owner_);
|
||||
QObject::connect(this, SIGNAL(iconSizeChanged(QSize)),
|
||||
layout_, SLOT(setIconSize(QSize)));
|
||||
addWidget(layout_);
|
||||
break;
|
||||
case ToolbarItem::MINIBUFFER:
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTextFrame>
|
||||
#include <QToolBar>
|
||||
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
@ -398,7 +397,7 @@ void LayoutBox::Private::setFilter(QString const & s)
|
||||
}
|
||||
|
||||
|
||||
LayoutBox::LayoutBox(QToolBar * bar, GuiView & owner)
|
||||
LayoutBox::LayoutBox(GuiView & owner)
|
||||
: d(new Private(this, owner))
|
||||
{
|
||||
setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
@ -414,8 +413,6 @@ LayoutBox::LayoutBox(QToolBar * bar, GuiView & owner)
|
||||
|
||||
QObject::connect(this, SIGNAL(activated(int)),
|
||||
this, SLOT(selected(int)));
|
||||
QObject::connect(bar, SIGNAL(iconSizeChanged(QSize)),
|
||||
this, SLOT(setIconSize(QSize)));
|
||||
|
||||
d->owner_.setLayoutDialog(this);
|
||||
updateContents(true);
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include <QComboBox>
|
||||
|
||||
class QToolBar;
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class DocumentClass;
|
||||
@ -36,7 +34,7 @@ class LayoutBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LayoutBox(QToolBar *, GuiView &);
|
||||
LayoutBox(GuiView &);
|
||||
|
||||
/// select the right layout in the combobox.
|
||||
void set(docstring const & layout);
|
||||
|
Loading…
Reference in New Issue
Block a user