Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
LayoutDocManager Class Reference

Singleton providing access to the (user configurable) layout of the documentation. More...

#include <layout.h>

Classes

class  Private
 

Public Types

enum  LayoutPart {
  Class, Namespace, File, Group,
  Directory, NrParts
}
 

Public Member Functions

const QList< LayoutDocEntry > & docEntries (LayoutPart part) const
 
LayoutNavEntryrootNavEntry () const
 
void parse (QTextStream &t, const char *fileName)
 
void init ()
 

Static Public Member Functions

static LayoutDocManagerinstance ()
 

Private Member Functions

void addEntry (LayoutPart p, LayoutDocEntry *e)
 
void clear (LayoutPart p)
 
 LayoutDocManager ()
 
 ~LayoutDocManager ()
 

Private Attributes

Privated
 

Friends

class LayoutParser
 

Detailed Description

Singleton providing access to the (user configurable) layout of the documentation.

Definition at line 173 of file layout.h.

Member Enumeration Documentation

Enumerator
Class 
Namespace 
File 
Group 
Directory 
NrParts 

Definition at line 177 of file layout.h.

Constructor & Destructor Documentation

LayoutDocManager::LayoutDocManager ( )
private

Definition at line 1328 of file layout.cpp.

1329 {
1330  d = new Private;
1331  int i;
1332  for (i=0;i<LayoutDocManager::NrParts;i++)
1333  {
1335  }
1336  d->rootNav = new LayoutNavEntry;
1338 }
Definition: types.h:26
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
QList< LayoutDocEntry > docEntries[LayoutDocManager::NrParts]
Definition: layout.cpp:1324
Private * d
Definition: layout.h:199
LayoutNavEntry * rootNav
Definition: layout.cpp:1325
static LayoutParser & instance()
Definition: layout.cpp:253
void init()
Definition: layout.cpp:258
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
LayoutDocManager::~LayoutDocManager ( )
private

Definition at line 1353 of file layout.cpp.

1354 {
1355  delete d->rootNav;
1356  delete d;
1357 }
Private * d
Definition: layout.h:199
LayoutNavEntry * rootNav
Definition: layout.cpp:1325

Member Function Documentation

void LayoutDocManager::addEntry ( LayoutDocManager::LayoutPart  p,
LayoutDocEntry e 
)
private

Definition at line 1375 of file layout.cpp.

1376 {
1377  d->docEntries[(int)p].append(e);
1378 }
p
Definition: test.py:223
QList< LayoutDocEntry > docEntries[LayoutDocManager::NrParts]
Definition: layout.cpp:1324
Private * d
Definition: layout.h:199
void LayoutDocManager::clear ( LayoutDocManager::LayoutPart  p)
private

Definition at line 1380 of file layout.cpp.

1381 {
1382  d->docEntries[(int)p].clear();
1383 }
void clear(LayoutPart p)
Definition: layout.cpp:1380
p
Definition: test.py:223
QList< LayoutDocEntry > docEntries[LayoutDocManager::NrParts]
Definition: layout.cpp:1324
Private * d
Definition: layout.h:199
const QList< LayoutDocEntry > & LayoutDocManager::docEntries ( LayoutDocManager::LayoutPart  part) const

Returns the list of LayoutDocEntry's in representation order for a given page identified by part.

Definition at line 1365 of file layout.cpp.

1366 {
1367  return d->docEntries[(int)part];
1368 }
QList< LayoutDocEntry > docEntries[LayoutDocManager::NrParts]
Definition: layout.cpp:1324
Private * d
Definition: layout.h:199
void LayoutDocManager::init ( )

Definition at line 1341 of file layout.cpp.

1342 {
1343  // parse the default layout
1344  LayoutErrorHandler errorHandler( "layout_default.xml" );
1346  source.setData( layout_default );
1347  QXmlSimpleReader reader;
1349  reader.setErrorHandler( &errorHandler );
1350  reader.parse( source );
1351 }
bool parse(const QXmlInputSource &input)
Definition: qxml.cpp:2077
void setErrorHandler(QXmlErrorHandler *handler)
Definition: qxml.cpp:2051
The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser).
Definition: qxml.h:238
void setContentHandler(QXmlContentHandler *handler)
Definition: qxml.cpp:2043
virtual void setData(const QString &d)
Definition: qxml.cpp:775
static const char layout_default[]
Definition: layout.cpp:35
static LayoutParser & instance()
Definition: layout.cpp:253
The QXmlInputSource class is the source where XML data is read from.
Definition: qxml.h:162
LayoutDocManager & LayoutDocManager::instance ( )
static

Returns a reference to this singleton.

Definition at line 1359 of file layout.cpp.

1360 {
1361  static LayoutDocManager *theInstance = new LayoutDocManager;
1362  return *theInstance;
1363 }
Singleton providing access to the (user configurable) layout of the documentation.
Definition: layout.h:173
void LayoutDocManager::parse ( QTextStream t,
const char *  fileName 
)

Parses a user provided layout

Definition at line 1385 of file layout.cpp.

1386 {
1387  LayoutErrorHandler errorHandler(fileName);
1388  QXmlInputSource source( t );
1389  QXmlSimpleReader reader;
1391  reader.setErrorHandler( &errorHandler );
1392  reader.parse( source );
1393 }
bool parse(const QXmlInputSource &input)
Definition: qxml.cpp:2077
void setErrorHandler(QXmlErrorHandler *handler)
Definition: qxml.cpp:2051
The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser).
Definition: qxml.h:238
void setContentHandler(QXmlContentHandler *handler)
Definition: qxml.cpp:2043
fileName
Definition: dumpTree.py:9
static LayoutParser & instance()
Definition: layout.cpp:253
The QXmlInputSource class is the source where XML data is read from.
Definition: qxml.h:162
LayoutNavEntry * LayoutDocManager::rootNavEntry ( ) const

returns the (invisible) root of the navigation tree.

Definition at line 1370 of file layout.cpp.

1371 {
1372  return d->rootNav;
1373 }
Private * d
Definition: layout.h:199
LayoutNavEntry * rootNav
Definition: layout.cpp:1325

Friends And Related Function Documentation

friend class LayoutParser
friend

Definition at line 200 of file layout.h.

Member Data Documentation

Private* LayoutDocManager::d
private

Definition at line 199 of file layout.h.


The documentation for this class was generated from the following files: