#include <pdfscene.h>

Public Types | |
| enum | Visibility { NothingVisible = 0x0, ImageVisible = 0x1, TextVisible = 0x2 } |
Public Slots | |
| void | image (QImage pm) |
| Load the given image into pdfView, to be shown in the main pane's QGraphicsView. | |
| void | image (int, QImage pm) |
| Convenience version of image(QImage) for cases when the signal to be connected happens to have a page number. | |
| QImage | image () |
| Getter for my current image. | |
| void | pageText (QList< Poppler::TextBox * > boxen) |
| Load the given text boxes into the pdfView, to be shown in the main pane's QGraphicsView if enabled. | |
| void | setTool (Tool *t) |
| Set my current tool. | |
| void | setImageVisible (bool v) |
| void | setTextVisible (bool v) |
Signals | |
| void | cursorPos (QPointF pos) |
| Current cursor position as detected in mouseMoveEvent. | |
Public Member Functions | |
| PDFScene () | |
Public Attributes | |
| BoxTool * | boxTool |
| SelectTool * | selectTool |
Protected Member Functions | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *ev) |
| Forward the mouse move event to the current Tool if appropriate. | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *ev) |
| Forward the mouse press event to the current Tool if appropriate. | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *ev) |
| Forward the mouse release event to the current Tool if appropriate. | |
| void | updateVisibilities () |
Private Attributes | |
| QGraphicsPixmapItem | pdfView |
| The rendering of the current PDF page. | |
| Tool * | tool |
| The current selected Tool, or NULL if none. | |
| Visibilities | visibleItems |
Definition at line 17 of file pdfscene.h.
| enum PDFScene::Visibility |
| PDFScene::PDFScene | ( | ) |
| void PDFScene::cursorPos | ( | QPointF | pos | ) | [signal] |
Current cursor position as detected in mouseMoveEvent.
Used to update the status bar.
Referenced by mouseMoveEvent().

| QImage PDFScene::image | ( | ) | [slot] |
| void PDFScene::image | ( | int | , | |
| QImage | pm | |||
| ) | [inline, slot] |
Convenience version of image(QImage) for cases when the signal to be connected happens to have a page number.
| pnum | page number of the given image (ignored) | |
| pm | image to be shown |
Definition at line 58 of file pdfscene.h.
References image().
Referenced by image().


| void PDFScene::image | ( | QImage | pm | ) | [slot] |
Load the given image into pdfView, to be shown in the main pane's QGraphicsView.
Definition at line 18 of file pdfscene.cpp.
References pdfView.
Referenced by MainWindow::on_actionExport_triggered().

| void PDFScene::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | ev | ) | [protected] |
Forward the mouse move event to the current Tool if appropriate.
Definition at line 52 of file pdfscene.cpp.
References cursorPos(), Tool::mouseMoveEvent(), and tool.

| void PDFScene::mousePressEvent | ( | QGraphicsSceneMouseEvent * | ev | ) | [protected] |
Forward the mouse press event to the current Tool if appropriate.
Definition at line 61 of file pdfscene.cpp.
References Tool::mousePressEvent(), and tool.

| void PDFScene::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | ev | ) | [protected] |
Forward the mouse release event to the current Tool if appropriate.
Also, if the mouse was pressed and released in the same spot, synthesize a Tool::mouseLeftClickEvent.
Definition at line 67 of file pdfscene.cpp.
References MOUSE_CLICK_MAX_MOVEMENT, Tool::mouseLeftClickEvent(), Tool::mouseReleaseEvent(), and tool.

| void PDFScene::pageText | ( | QList< Poppler::TextBox * > | boxen | ) | [slot] |
Load the given text boxes into the pdfView, to be shown in the main pane's QGraphicsView if enabled.
Definition at line 24 of file pdfscene.cpp.
References TextVisible, and visibleItems.
| void PDFScene::setImageVisible | ( | bool | v | ) | [inline, slot] |
Definition at line 80 of file pdfscene.h.
References ImageVisible, updateVisibilities(), and visibleItems.
Referenced by MainWindow::on_actionViewPageImage_toggled().


| void PDFScene::setTextVisible | ( | bool | v | ) | [inline, slot] |
Definition at line 86 of file pdfscene.h.
References TextVisible, updateVisibilities(), and visibleItems.
Referenced by MainWindow::on_actionViewPageText_toggled().


| void PDFScene::setTool | ( | Tool * | t | ) | [inline, slot] |
Set my current tool.
The UI should call Tool::activate() instead, when the user chooses a different tool. However it's also possible to call setTool(NULL) to get the non-tool default behavior.
Definition at line 78 of file pdfscene.h.
References tool.
Referenced by SelectTool::activate(), BoxTool::activate(), and MainWindow::on_actionPan_toggled().

| void PDFScene::updateVisibilities | ( | ) | [protected] |
Definition at line 84 of file pdfscene.cpp.
References ImageVisible, TextVisible, and visibleItems.
Referenced by setImageVisible(), and setTextVisible().

QGraphicsPixmapItem PDFScene::pdfView [private] |
The rendering of the current PDF page.
Definition at line 119 of file pdfscene.h.
Referenced by image(), and PDFScene().
Tool* PDFScene::tool [private] |
The current selected Tool, or NULL if none.
Definition at line 124 of file pdfscene.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and setTool().
Visibilities PDFScene::visibleItems [private] |
Definition at line 126 of file pdfscene.h.
Referenced by pageText(), setImageVisible(), setTextVisible(), and updateVisibilities().
1.5.8