// -*- C++ -*-
/**
- * \file Toolbar_pimpl.h
+ * \file qt2/Toolbar_pimpl.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
#include "frontends/Toolbar.h"
-#include <qobject.h>
-#include <qtoolbutton.h>
-
#include <boost/scoped_ptr.hpp>
#include <map>
#include <vector>
+#include <qobject.h>
+#include <qtoolbutton.h>
+
class QtView;
class QToolBar;
class QLComboBox;
class ToolbarProxy;
struct Toolbar::Pimpl {
-
+public:
friend class ToolbarProxy;
-public:
Pimpl(LyXView * o, int x, int y);
~Pimpl();
/// add a new button to the toolbar.
- void add(int action);
+ void add(int action);
/// update the state of the icons
void update();
void openLayoutList();
/// Erase the layout list
void clearLayoutList();
-
private:
void changed_layout(string const & sel);
typedef std::map<QToolButton *, int> ButtonMap;
ButtonMap map_;
-
};
// moc is mind-numbingly stupid
class ToolbarProxy : public QObject {
Q_OBJECT
-
public:
ToolbarProxy(Toolbar::Pimpl & owner)
- : owner_(owner) { };
-
+ : owner_(owner) {}
public slots:
void layout_selected(const QString & str) {
static_cast<QToolButton const *>(sender()))
);
}
-
private:
Toolbar::Pimpl & owner_;
};