4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
26 class TearOff : public QWidget {
29 TearOff(QWidget * parent);
30 #if QT_VERSION < 0x060000
31 void enterEvent(QEvent *) override;
33 void enterEvent(QEnterEvent *) override;
35 void leaveEvent(QEvent *) override;
36 void mouseReleaseEvent (QMouseEvent *) override;
40 void paintEvent(QPaintEvent *) override;
47 * For holding an arbitrary set of icons.
49 class IconPalette : public QWidget {
52 IconPalette(QWidget * parent);
53 void addButton(QAction *);
56 void triggered(QAction *);
60 void showEvent(QShowEvent * event) override;
61 void hideEvent(QHideEvent * event) override;
62 void paintEvent(QPaintEvent * event) override;
66 virtual void clicked(QAction *);
69 QGridLayout * layout_;
70 QList<QAction *> actions_;
72 TearOff * tearoffwidget_;
77 * Popup menu for a toolbutton.
78 * We need this to keep track whether
79 * it is necessary to enable/disable
82 class ButtonMenu : public QMenu {
85 ButtonMenu(const QString & title, QWidget * parent);
92 QList<QAction *> actions_;
96 } // namespace frontend
99 #endif // ICONPALETTE_H