kviewshell
pageNumber.h
Go to the documentation of this file.00001 // -*- C++ -*- 00002 // 00003 // pageNumber.h 00004 // 00005 // Part of KVIEWSHELL - A framework for multipage text/gfx viewers 00006 // 00007 // (C) 2004 Stefan Kebekus 00008 // Distributed under the GPL 00009 00010 // Add header files alphabetically 00011 00012 #ifndef PAGENUMBER_H 00013 #define PAGENUMBER_H 00014 00015 #include <qglobal.h> 00016 00017 00032 class PageNumber 00033 { 00034 public: 00035 enum pageNums { 00036 invalidPage = 0 00037 }; 00038 00040 PageNumber() {pgNum = invalidPage;} 00041 00046 PageNumber(Q_UINT16 num) {pgNum = num;} 00047 00049 PageNumber &operator=(const Q_UINT16 p) { pgNum = p; return *this; } 00050 00052 operator Q_UINT16() const { return pgNum; } 00053 00058 bool isValid() const {return (pgNum != invalidPage);} 00059 00060 private: 00062 Q_UINT16 pgNum; 00063 }; 00064 00065 #endif