|
scantools
1.0.4
Graphics manipulation with a view towards scanned documents
|
The paperSize class identifies and stores paper sizes. More...
#include <paperSize.h>
Public Types | |
| enum | format { A4 , A5 , empty , Letter , Legal } |
| List of supported standard sizes. More... | |
Public Member Functions | |
| paperSize () | |
| Constructs empty paperSize. | |
| paperSize (length width, length height) | |
| Constructs paperSize of given width and height. More... | |
| paperSize (format f) | |
| Constructs paperSize for given standard format. More... | |
| paperSize (QString formatString, bool *ok=0) | |
| Constructs paperSize from a string. More... | |
| bool | isEmpty () const |
| Checks for empty paper size. More... | |
| void | setHeight (length height) |
| Sets paper height. More... | |
| void | setWidth (length width) |
| Sets paper width. More... | |
| length | height () const |
| Height of the paper. More... | |
| length | width () const |
| Width of the paper. More... | |
| void | setSize (format f) |
| Sets paperSize to a given standard format. More... | |
| bool | setSize (QString formatString) |
| Reads paperSize from a string. More... | |
The paperSize class identifies and stores paper sizes.
This is a trivial class that helps to identify and store paper sizes. It knows about a few standard sizes.
Definition at line 31 of file paperSize.h.
| enum paperSize::format |
List of supported standard sizes.
| Enumerator | |
|---|---|
| A4 | DIN A4. |
| A5 | DIN A5. |
| empty | 0x0mm |
| Letter | US Standard Letter. |
| Legal | US Legal. |
Definition at line 35 of file paperSize.h.
Constructs paperSize of given width and height.
| width | Width of the new paper size |
| height | Height of the new paper size |
Definition at line 53 of file paperSize.h.
|
inline |
Constructs paperSize for given standard format.
| f | Standard paper format |
Definition at line 61 of file paperSize.h.
|
inline |
Constructs paperSize from a string.
This method calls setSize(QString, bool *) interally.
| ok | If the string is not recoginzed *ok is set to false and the paper size if empty. Otherwise, *ok is set to true. |
| formatString | Should be "A4", "Letter", "297mmx210mm" etc. |
Definition at line 74 of file paperSize.h.
|
inline |
|
inline |
Checks for empty paper size.
Definition at line 84 of file paperSize.h.
|
inline |
| void paperSize::setSize | ( | format | f | ) |
Sets paperSize to a given standard format.
| f | On of the standard formats defined above |
| bool paperSize::setSize | ( | QString | formatString | ) |
Reads paperSize from a string.
| formatString | Should be "A4", "Letter", "297mmx210mm" etc. |
|
inline |
|
inline |