SymbolEditor  1.3.0
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
SymbolLibrary.cpp File Reference
#include "SymbolLibrary.h"
#include <QDataStream>
#include <QListWidgetItem>
#include <QPainter>
#include <QtAlgorithms>
#include <KLocale>
#include "Exceptions.h"
#include "SymbolListWidget.h"
Include dependency graph for SymbolLibrary.cpp:

Go to the source code of this file.

Functions

QDataStream & operator<< (QDataStream &stream, const SymbolLibrary &library)
 
QDataStream & operator>> (QDataStream &stream, SymbolLibrary &library)
 

Detailed Description

Implement the SymbolLibrary class

Definition in file SymbolLibrary.cpp.

Function Documentation

QDataStream& operator<< ( QDataStream &  stream,
const SymbolLibrary library 
)

Stream out the file. Symbol files are indicated with a magic string of KXStitchSymbols. The stream version is set to maintain consistency with the streamed objects. Write the version, current index and the map of symbols.

Parameters
streama reference to a QDataStream
librarya const reference to a SymbolLibrary
Returns
a reference to a QDataStream

Definition at line 246 of file SymbolLibrary.cpp.

QDataStream& operator>> ( QDataStream &  stream,
SymbolLibrary library 
)

Stream in the file. Initially clear the current contents. Symbol files are indicated with a magic string of KXStitchSymbols. The stream version is set to maintain consistency with the streamed objects. Read and check the magic string. If this is not a symbol file throw an exception. Read in the version. Read the data for the specified version. The stream is checked for errors and an exception is thrown if there was an error.

Parameters
streama reference to a QDataStream
librarya reference to a SymbolLibrary
Returns
a reference to a QDataStream

Definition at line 287 of file SymbolLibrary.cpp.

Here is the call graph for this function: