PageNumber Class Reference
#include <pageNumber.h>
Detailed Description
Class to represent a page number.The class PageNumber is really nothing but an alias for Q_UINT16, and can be casted to and from Q_UINT16. It is used in kviewshell to remind the programmer of the convention that page numbers start at '1' (for 'first page'), and that the value '0' means 'illegal page number' or 'no page number'. Accordingly, the value '0' is also named PageNumber::invalidPage, and there is a trivial method isInvalid() that checks if the page number is 0.
- Author:
- Stefan Kebekus <kebekus@kde.org>
- Version:
- 1.0 0
Definition at line 32 of file pageNumber.h.
Public Types | |
| invalidPage = 0 | |
| enum | pageNums { invalidPage = 0 } |
Public Member Functions | |
| PageNumber () | |
| PageNumber (Q_UINT16 num) | |
| PageNumber & | operator= (const Q_UINT16 p) |
| operator Q_UINT16 () const | |
| bool | isValid () const |
Constructor & Destructor Documentation
| PageNumber::PageNumber | ( | ) | [inline] |
The default constructor sets the page number to 'invalidPage'.
Definition at line 40 of file pageNumber.h.
| PageNumber::PageNumber | ( | Q_UINT16 | num | ) | [inline] |
Constructor that sets the page number.
- Parameters:
-
num page number that is set initially
Definition at line 46 of file pageNumber.h.
Member Function Documentation
| bool PageNumber::isValid | ( | ) | const [inline] |
Checks if the page number is invalid.
- Returns:
- true, if pgNum != invalidPage, i.e., does not equal 0
Definition at line 58 of file pageNumber.h.
| PageNumber::operator Q_UINT16 | ( | ) | const [inline] |
| PageNumber& PageNumber::operator= | ( | const Q_UINT16 | p | ) | [inline] |
The documentation for this class was generated from the following file:

