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

okular

fontinfo.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Pino Toscano <pino@kde.org>                     *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU General Public License as published by  *
00006  *   the Free Software Foundation; either version 2 of the License, or     *
00007  *   (at your option) any later version.                                   *
00008  ***************************************************************************/
00009 
00010 // local includes
00011 #include "fontinfo.h"
00012 
00013 using namespace Okular;
00014 
00015 class Okular::FontInfoPrivate
00016     : public QSharedData
00017 {
00018     public:
00019         FontInfoPrivate()
00020           : type( FontInfo::Unknown ), embedType( FontInfo::NotEmbedded )
00021         {
00022         }
00023 
00024         bool operator==( const FontInfoPrivate &rhs ) const
00025         {
00026             return name == rhs.name &&
00027                    type == rhs.type &&
00028                    embedType == rhs.embedType &&
00029                    file == rhs.file;
00030         }
00031 
00032         QString name;
00033         FontInfo::FontType type;
00034         FontInfo::EmbedType embedType;
00035         QString file;
00036 };
00037 
00038 
00039 FontInfo::FontInfo()
00040     : d( new FontInfoPrivate )
00041 {
00042 }
00043 
00044 FontInfo::FontInfo( const FontInfo &fi )
00045     : d( fi.d )
00046 {
00047 }
00048 
00049 FontInfo::~FontInfo()
00050 {
00051 }
00052 
00053 QString FontInfo::name() const
00054 {
00055     return d->name;
00056 }
00057 
00058 void FontInfo::setName( const QString& name )
00059 {
00060     d->name = name;
00061 }
00062 
00063 FontInfo::FontType FontInfo::type() const
00064 {
00065     return d->type;
00066 }
00067 
00068 void FontInfo::setType( FontInfo::FontType type )
00069 {
00070     d->type = type;
00071 }
00072 
00073 FontInfo::EmbedType FontInfo::embedType() const
00074 {
00075     return d->embedType;
00076 }
00077 
00078 void FontInfo::setEmbedType( FontInfo::EmbedType type )
00079 {
00080     d->embedType = type;
00081 }
00082 
00083 QString FontInfo::file() const
00084 {
00085     return d->file;
00086 }
00087 
00088 void FontInfo::setFile( const QString& file )
00089 {
00090     d->file = file;
00091 }
00092 
00093 bool FontInfo::operator==( const FontInfo &fi ) const
00094 {
00095     return *d == *fi.d;
00096 }
00097 
00098 bool FontInfo::operator!=( const FontInfo &fi ) const
00099 {
00100     return !operator==( fi );
00101 }
00102 
00103 FontInfo& FontInfo::operator=( const FontInfo &fi )
00104 {
00105     if ( this == &fi )
00106         return *this;
00107 
00108     d = fi.d;
00109     return *this;
00110 }
00111 

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.5.4
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