• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

PageNumber Class Reference

Class to represent a page number. More...

#include <pageNumber.h>

List of all members.


Public Types

enum  pageNums { invalidPage = 0 }

Public Member Functions

bool isValid () const
 operator Q_UINT16 () const
PageNumber & operator= (const Q_UINT16 p)
 PageNumber (Q_UINT16 num)
 PageNumber ()

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.


Member Enumeration Documentation

enum PageNumber::pageNums

Enumerator:
invalidPage 

Definition at line 35 of file pageNumber.h.


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]

This method implements typecasts to Q_UINT16.

Definition at line 52 of file pageNumber.h.

PageNumber& PageNumber::operator= ( const Q_UINT16  p  )  [inline]

this method implements typecasts from Q_UINT16

Definition at line 49 of file pageNumber.h.


The documentation for this class was generated from the following file:
  • pageNumber.h

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal