19 #ifndef LIB_QUENTIER_TYPES_RESOURCE_RECOGNITION_INDEX_ITEM_H 20 #define LIB_QUENTIER_TYPES_RESOURCE_RECOGNITION_INDEX_ITEM_H 22 #include <quentier/utility/Linkage.h> 23 #include <quentier/utility/Printable.h> 25 #include <QSharedDataPointer> 29 QT_FORWARD_DECLARE_CLASS(ResourceRecognitionIndexItemData)
42 void setX(
const int x);
45 void setY(
const int y);
48 void setH(
const int h);
51 void setW(
const int w);
54 void setOffset(
const int offset);
57 void setDuration(
const int duration);
59 QVector<int> strokeList()
const;
60 int numStrokes()
const;
61 bool strokeAt(
const int strokeIndex,
int & stroke)
const;
62 bool setStrokeAt(
const int strokeIndex,
const int stroke);
63 void setStrokeList(
const QVector<int> & strokeList);
64 void reserveStrokeListSpace(
const int numItems);
65 void addStroke(
const int stroke);
66 bool removeStroke(
const int stroke);
67 bool removeStrokeAt(
const int strokeIndex);
71 TextItem() : m_text(), m_weight(-1) {}
73 bool operator==(
const TextItem & other)
const {
return (m_text == other.m_text) && (m_weight == other.m_weight); }
79 QVector<TextItem> textItems()
const;
80 int numTextItems()
const;
81 bool textItemAt(
const int textItemIndex,
TextItem & textItem)
const;
82 bool setTextItemAt(
const int textItemIndex,
const TextItem & textItem);
83 void setTextItems(
const QVector<TextItem> & textItems);
84 void reserveTextItemsSpace(
const int numItems);
85 void addTextItem(
const TextItem & item);
86 bool removeTextItem(
const TextItem & item);
87 bool removeTextItemAt(
const int textItemIndex);
93 bool operator==(
const ObjectItem & other)
const {
return (m_objectType == other.m_objectType) && (m_weight == other.m_weight); }
99 QVector<ObjectItem> objectItems()
const;
100 int numObjectItems()
const;
101 bool objectItemAt(
const int objectItemIndex,
ObjectItem & objectItem)
const;
102 bool setObjectItemAt(
const int objectItemIndex,
const ObjectItem & objectItem);
103 void setObjectItems(
const QVector<ObjectItem> & objectItems);
104 void reserveObjectItemsSpace(
const int numItems);
106 bool removeObjectItem(
const ObjectItem & item);
107 bool removeObjectItemAt(
const int objectItemIndex);
111 ShapeItem() : m_shapeType(), m_weight(-1) {}
113 bool operator==(
const ShapeItem & other)
const {
return (m_shapeType == other.m_shapeType) && (m_weight == other.m_weight); }
119 QVector<ShapeItem> shapeItems()
const;
120 int numShapeItems()
const;
121 bool shapeItemAt(
const int shapeItemIndex,
ShapeItem & shapeItem)
const;
122 bool setShapeItemAt(
const int shapeItemIndex,
const ShapeItem & shapeItem);
123 void setShapeItems(
const QVector<ShapeItem> & shapeItems);
124 void reserveShapeItemsSpace(
const int numItems);
125 void addShapeItem(
const ShapeItem & item);
126 bool removeShapeItem(
const ShapeItem & item);
127 bool removeShapeItemAt(
const int shapeItemIndex);
133 bool operator==(
const BarcodeItem & other)
const {
return (m_barcode == other.m_barcode) && (m_weight == other.m_weight); }
139 QVector<BarcodeItem> barcodeItems()
const;
140 int numBarcodeItems()
const;
141 bool barcodeItemAt(
const int barcodeItemIndex,
BarcodeItem & barcodeItem)
const;
142 bool setBarcodeItemAt(
const int barcodeItemIndex,
const BarcodeItem & barcodeItem);
143 void setBarcodeItems(
const QVector<BarcodeItem> & barcodeItems);
144 void reserveBarcodeItemsSpace(
const int numItems);
147 bool removeBarcodeItemAt(
const int barcodeItemIndex);
149 virtual QTextStream & print(QTextStream & strm)
const Q_DECL_OVERRIDE;
152 QSharedDataPointer<ResourceRecognitionIndexItemData> d;
157 #endif // LIB_QUENTIER_TYPES_RESOURCE_RECOGNITION_INDEX_ITEM_H The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition: Printable.h:54
Definition: ResourceRecognitionIndexItem.h:109
Definition: ResourceRecognitionIndexItem.h:89
Definition: ResourceRecognitionIndexItem.h:129
Definition: ResourceRecognitionIndexItem.h:69
Definition: ResourceRecognitionIndexItem.h:31