2009-08-12 21:51:10 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file LayoutBox.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Lars Gullik Bjønnes
|
|
|
|
* \author John Levon
|
|
|
|
* \author Jean-Marc Lasgouttes
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LYX_LAYOUT_BOX_H
|
|
|
|
#define LYX_LAYOUT_BOX_H
|
|
|
|
|
|
|
|
#include "support/strfwd.h"
|
|
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
class DocumentClass;
|
|
|
|
class Inset;
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class GuiView;
|
|
|
|
class LayoutItemDelegate;
|
|
|
|
|
|
|
|
class LayoutBox : public QComboBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2009-08-14 22:47:57 +00:00
|
|
|
LayoutBox(GuiView &);
|
2011-10-15 13:34:14 +00:00
|
|
|
~LayoutBox();
|
2009-08-12 21:51:10 +00:00
|
|
|
|
|
|
|
/// select the right layout in the combobox.
|
|
|
|
void set(docstring const & layout);
|
|
|
|
/// Populate the layout combobox.
|
|
|
|
void updateContents(bool reset);
|
|
|
|
/// Add Item to Layout box according to sorting settings from preferences
|
|
|
|
void addItemSort(docstring const & item, docstring const & category,
|
|
|
|
bool sorted, bool sortedByCat, bool unknown);
|
|
|
|
|
|
|
|
///
|
|
|
|
void showPopup();
|
2017-07-03 17:45:58 +00:00
|
|
|
|
2009-08-12 21:51:10 +00:00
|
|
|
///
|
|
|
|
bool eventFilter(QObject * o, QEvent * e);
|
|
|
|
///
|
|
|
|
QString const & filter() const;
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
///
|
|
|
|
void selected(int index);
|
|
|
|
///
|
|
|
|
void setIconSize(QSize size);
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class LayoutItemDelegate;
|
2015-09-20 17:43:06 +00:00
|
|
|
class Private;
|
2009-08-12 21:51:10 +00:00
|
|
|
Private * const d;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // LYX_LAYOUT_BOX_H
|