mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Copying text to clipboard
This commit is contained in:
@ -238,9 +238,15 @@ public:
|
||||
/// Returns iterator to end of page range
|
||||
iterator end(PDFInteger pageIndex) const;
|
||||
|
||||
/// Returns iterator to next page range
|
||||
iterator nextPageRange(iterator currentPageRange) const;
|
||||
|
||||
/// Returns true, if text selection is empty
|
||||
bool isEmpty() const { return m_items.empty(); }
|
||||
|
||||
iterator begin() const { return m_items.cbegin(); }
|
||||
iterator end() const { return m_items.cend(); }
|
||||
|
||||
private:
|
||||
PDFTextSelectionColoredItems m_items;
|
||||
};
|
||||
@ -288,6 +294,11 @@ public:
|
||||
/// \param expression Regular expression to be matched
|
||||
PDFFindResults find(const QRegularExpression& expression) const;
|
||||
|
||||
/// Returns text form character pointers
|
||||
/// \param begin Begin character
|
||||
/// \param end End character
|
||||
QString getText(const PDFCharacterPointer& begin, const PDFCharacterPointer& end) const;
|
||||
|
||||
/// Merge data from \p next flow (i.e. connect two consecutive flows)
|
||||
void merge(const PDFTextFlow& next);
|
||||
|
||||
@ -347,6 +358,17 @@ public:
|
||||
/// \param point2 Second point
|
||||
PDFTextSelection createTextSelection(PDFInteger pageIndex, const QPointF& point1, const QPointF& point2);
|
||||
|
||||
/// Returns string from text selection
|
||||
/// \param itBegin Iterator (begin range)
|
||||
/// \param itEnd Iterator (end range)
|
||||
/// \param pageIndex Index of the page
|
||||
QString getTextFromSelection(PDFTextSelection::iterator itBegin, PDFTextSelection::iterator itEnd, PDFInteger pageIndex) const;
|
||||
|
||||
/// Returns string from text selection
|
||||
/// \param selection Text selection
|
||||
/// \param pageIndex Index of the page
|
||||
QString getTextFromSelection(const PDFTextSelection& selection, PDFInteger pageIndex) const;
|
||||
|
||||
friend QDataStream& operator<<(QDataStream& stream, const PDFTextLayout& layout);
|
||||
friend QDataStream& operator>>(QDataStream& stream, PDFTextLayout& layout);
|
||||
|
||||
|
Reference in New Issue
Block a user