Sorted includes alphabetically.
[situare] / src / ui / listitemdelegate.cpp
index b350db4..c1d3094 100644 (file)
    USA.
 */
 
-#include <QPainter>
 #include <QDebug>
+#include <QPainter>
 
-#include "listitemdelegate.h"
-#include "listitem.h"
 #include "../common.h"
-#include "listcommon.h"
 #include "avatarimage.h"
+#include "listcommon.h"
+#include "listitem.h"
+
+#include "listitemdelegate.h"
 
-const int BACKGROUND_BOTTOM_HEIGHT = 15;
-const int BACKGROUND_TOP_HEIGHT = 20;
-const int NAME_TOP_MARGIN = 40;
+const int BACKGROUND_BOTTOM_HEIGHT = 15;    ///< Background image bottom height
+const int BACKGROUND_TOP_HEIGHT = 20;       ///< Background image top height
+const int NAME_TOP_MARGIN = 40;             ///< Name text top margin
 
 ListItemDelegate::ListItemDelegate(QWidget *parent) :
     QStyledItemDelegate(parent)
@@ -70,13 +71,13 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
 
     //Image is set, draw image and text
     if (!image.isNull()) {
-        painter->drawPixmap(itemRect.left() + MARGIN*2, itemRect.top(), image);
-        painter->drawText(itemRect.topLeft() + QPoint(MARGIN*2 + IMAGE_WIDTH + MARGIN,
+        painter->drawPixmap(itemRect.left() + MARGIN * 2, itemRect.top(), image);
+        painter->drawText(itemRect.topLeft() + QPoint(MARGIN * 2 + IMAGE_WIDTH + MARGIN,
                                                       NAME_TOP_MARGIN), name);
     }
     //Draw only text
     else {
-        painter->drawText(itemRect.topLeft() + QPoint(MARGIN*3, NAME_TOP_MARGIN), name);
+        painter->drawText(itemRect.topLeft() + QPoint(MARGIN * 3, NAME_TOP_MARGIN), name);
     }
 }