SgmlCatalog

The SgmlCatalog class maintains and allows editing of a list of SGML CatalogEntry's. More...

Publicly inherits QDialog.

Public Methods

SgmlCatalog( );
QList<CatalogEntry>&entries( );
QStringentryToString( const CatalogEntry* e );
CatalogEntry*find( Type type, QString id );
voidsave( );
voidstringToEntry( const QString str, int& type, QString& id, QString& soi );
~SgmlCatalog( );

Protected Methods

voidresizeEvent( QResizeEvent* e );

Private Methods

QStringgetToken( FILE* fp );

Private Slots

voiddoAdd( );
voiddoDelete( );
voiddoHighlighted( int index );
voiddoUpdate( );

Private Data Members

QPushButton*_addButton;
QPushButton*_closeButton;
QPushButton*_deleteButton;
QList<CatalogEntry>_entries;
QListBox*_list;
QLineEdit*_publicIdEntry;
QLabel*_publicIdLabel;
QFrame*_separator;
QLineEdit*_storageIdEntry;
QLabel*_storageIdLabel;
QComboBox*_typeCombo;
QLabel*_typeLabel;
QPushButton*_updateButton;

Detailed Documentation

The SgmlCatalog class maintains and allows editing of a list of SGML CatalogEntry's.

There is exactly one SgmlCatalog for the entire application. This catalog provides a mapping from SGML object types and their public identifiers to their storage object identifiers. The SgmlCatalog object is also a modal dialog for editing the catalog entries.

Public Methods Documentation

SgmlCatalog ( );

Create the SGML catalog and read in the catalog entries from the catalog file.

QList<CatalogEntry>& entries ( );

Return a reference to the list of all catalog entries.

QString entryToString ( const CatalogEntry* e );

Convert the given catalog entry to a string that can be displayed in a listbox or written to a catalog file.

CatalogEntry* find ( Type type, QString id );

Locate the catalog entry with the given type and public identifier.

void save ( );

Write the SGML Catalog to the file given in the options object.

void stringToEntry ( const QString str, int& type, QString& id, QString& soi );

Convert the string form of a catalog entry (as shown in the catalog listbox during editing) to its component parts.

~SgmlCatalog ( );

Destroy the SGML catalog and all its entries.

Protected Methods Documentation

void resizeEvent ( QResizeEvent* e );

Reposition my widgets (duh).

Private Methods Documentation

QString getToken ( FILE* fp );

Return the next token from the open file. Tokens are delimited by white space and single or double quotes.

Private Slots Documentation

void doAdd ( );

Add a new catalog entry based on the data in the edit fields.

void doDelete ( );

Delete the selected listbox row from the catalog.

void doHighlighted ( int index );

When a row is selected in the listbox, copy the catalog entry data into the edit fields.

void doUpdate ( );

Update the catalog with the data in the edit fields.


Return to Index.
Automatically generated on Aug 11 23:32