Qt 4.8
Classes | Macros | Functions
qitemdelegate.cpp File Reference
#include "qitemdelegate.h"
#include <qabstractitemmodel.h>
#include <qapplication.h>
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
#include <qplaintextedit.h>
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
#include <qrect.h>
#include <qsize.h>
#include <qstyle.h>
#include <qdatetime.h>
#include <qstyleoption.h>
#include <qevent.h>
#include <qpixmap.h>
#include <qbitmap.h>
#include <qpixmapcache.h>
#include <qitemeditorfactory.h>
#include <qmetaobject.h>
#include <qtextlayout.h>
#include <private/qobject_p.h>
#include <private/qdnd_p.h>
#include <private/qtextengine_p.h>
#include <qdebug.h>
#include <qlocale.h>
#include <qdialog.h>
#include <qmath.h>
#include <limits.h>
#include "moc_qitemdelegate.cpp"

Go to the source code of this file.

Classes

class  QItemDelegatePrivate
 
struct  QItemDelegatePrivate::Icon
 

Macros

#define DBL_DIG   10
 

Functions

static QString qPixmapSerial (quint64 i, bool enabled)
 

Macro Definition Documentation

◆ DBL_DIG

#define DBL_DIG   10

Definition at line 77 of file qitemdelegate.cpp.

Referenced by QItemDelegatePrivate::valueToText().

Function Documentation

◆ qPixmapSerial()

static QString qPixmapSerial ( quint64  i,
bool  enabled 
)
static

Definition at line 1034 of file qitemdelegate.cpp.

Referenced by QItemDelegate::selected().

1035 {
1036  ushort arr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', ushort('0' + enabled) };
1037  ushort *ptr = &arr[16];
1038 
1039  while (i > 0) {
1040  // hey - it's our internal representation, so use the ascii character after '9'
1041  // instead of 'a' for hex
1042  *(--ptr) = '0' + i % 16;
1043  i >>= 4;
1044  }
1045 
1046  return QString((const QChar *)ptr, int(&arr[sizeof(arr) / sizeof(ushort)] - ptr));
1047 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
const T * ptr(const T &t)
unsigned short ushort
Definition: qglobal.h:995
#define enabled