mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
AudioBook Plugin: Item selection by text, regular expression, page indices
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
|
||||
#include "pdfglobal.h"
|
||||
#include "pdfexception.h"
|
||||
#include "pdfutils.h"
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
@ -198,6 +199,9 @@ public:
|
||||
/// Returns true, if text flow is empty
|
||||
bool isEmpty() const { return m_originalTextFlow.isEmpty(); }
|
||||
|
||||
/// Returns true, if text selection is empty
|
||||
bool isSelectionEmpty() const;
|
||||
|
||||
/// Returns item count in edited text flow
|
||||
size_t getItemCount() const { return m_editedTextFlow.size(); }
|
||||
|
||||
@ -214,6 +218,18 @@ public:
|
||||
/// \param rectangle Selection rectangle
|
||||
void selectByRectangle(QRectF rectangle);
|
||||
|
||||
/// Select items which contains text
|
||||
/// \param text Text
|
||||
void selectByContainedText(QString text);
|
||||
|
||||
/// Select items which matches regular expression
|
||||
/// \param expression Regular expression
|
||||
void selectByRegularExpression(const QRegularExpression& expression);
|
||||
|
||||
/// Select all items on a given page indices
|
||||
/// \param indices Indices
|
||||
void selectByPageIndices(const PDFClosedIntervalSet& indices);
|
||||
|
||||
private:
|
||||
void createEditedFromOriginalTextFlow();
|
||||
void updateModifiedFlag(size_t index);
|
||||
|
Reference in New Issue
Block a user