7#include <QtCore/qstring.h>
16 CodeChunk() : m_hotspot(-1) { }
18 void append(
const QString &lexeme);
22 m_hotspot = m_str.size();
25 [[nodiscard]]
bool isEmpty()
const {
return m_str.isEmpty(); }
26 void clear() { m_str.clear(); }
27 [[nodiscard]] QString toString()
const {
return m_str; }
28 [[nodiscard]] QString left()
const
30 return m_str.left(m_hotspot == -1 ? m_str.size() : m_hotspot);
32 [[nodiscard]] QString right()
const
34 return m_str.mid(m_hotspot == -1 ? m_str.size() : m_hotspot);
39 qsizetype m_hotspot {};
42inline bool operator==(
const CodeChunk &c,
const CodeChunk &d)
44 return c.toString() == d.toString();
47inline bool operator!=(
const CodeChunk &c,
const CodeChunk &d)
52inline bool operator<(
const CodeChunk &c,
const CodeChunk &d)
54 return c.toString() < d.toString();
57inline bool operator>(
const CodeChunk &c,
const CodeChunk &d)
62inline bool operator<=(
const CodeChunk &c,
const CodeChunk &d)
67inline bool operator>=(
const CodeChunk &c,
const CodeChunk &d)
static const bool needSpace[9][9]
static int category(QChar ch)
static const int charCategory[256]
bool operator>(const CodeChunk &c, const CodeChunk &d)
bool operator<=(const CodeChunk &c, const CodeChunk &d)
bool operator>=(const CodeChunk &c, const CodeChunk &d)
bool operator<(const CodeChunk &c, const CodeChunk &d)
bool operator==(const CodeChunk &c, const CodeChunk &d)
bool operator!=(const CodeChunk &c, const CodeChunk &d)
Combined button and popup list for selecting options.