#include "Paragraph.h"
#include "version.h"
+#include "support/assert.h"
#include "support/debug.h"
#include <QApplication>
namespace lyx {
namespace frontend {
-class RtlItemDelegate : public QItemDelegate {
+class RtlItemDelegate : public QItemDelegate
+{
public:
- explicit RtlItemDelegate(QObject * parent = 0)
- : QItemDelegate(parent), enabled_(false) {}
+ explicit RtlItemDelegate(QObject * parent)
+ : QItemDelegate(parent), enabled_(false)
+ {}
void setEnabled(bool enabled = true)
{
}
protected:
- virtual void drawDisplay(QPainter * painter,
+ void drawDisplay(QPainter * painter,
QStyleOptionViewItem const & option,
QRect const & rect, QString const & text) const
{
};
-class PixmapItemDelegate : public QItemDelegate {
+class PixmapItemDelegate : public QItemDelegate
+{
public:
- explicit PixmapItemDelegate(QObject *parent = 0)
- : QItemDelegate(parent) {}
+ explicit PixmapItemDelegate(QObject * parent)
+ : QItemDelegate(parent)
+ {}
protected:
void paint(QPainter *painter, const QStyleOptionViewItem &option,
};
-class GuiCompletionModel : public QAbstractListModel {
+class GuiCompletionModel : public QAbstractListModel
+{
public:
///
GuiCompletionModel(QObject * parent, CompletionList const * l)
- : QAbstractListModel(parent), list_(l) {}
+ : QAbstractListModel(parent), list_(l)
+ {}
///
- ~GuiCompletionModel()
- { delete list_; }
+ ~GuiCompletionModel() { delete list_; }
///
bool sorted() const
{
if (list_)
return list_->sorted();
- else
- return false;
+ return false;
}
///
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const
if (index.column() == 0)
return toqstr(list_->data(index.row()));
- else if (index.column() == 1) {
+
+ if (index.column() == 1) {
// get icon from cache
QPixmap scaled;
QString const name = ":" + toqstr(list_->icon(index.row()));
i = n;
else
i = l;
- BOOST_ASSERT(i <= n);
+ LASSERT(i <= n, /**/);
}
// select the first if none was found