13 using namespace
Diana;
28 std::map<std::string, QObject*>::const_iterator
object
34 if(className ==
"Diana::QString") {
38 err.SetDescription(
GetName(),__LINE__,std::string(
"Invalid type \"")+className+
"\"");
43 (*fQObjectCache)[name] = obj;
52 bool buildingString =
false;
53 bool buildingGraphicalCut =
false;
58 while (getline(file, line)) {
60 string::size_type delimiter = line.find_first_of(
" ");
61 if (delimiter != string::npos) {
62 key = line.substr(0, delimiter);
63 value = line.substr(delimiter + 1);
69 buildingString =
true;
70 buildingGraphicalCut =
false;
71 currentGraphicalCut = 0;
73 buildingString =
false;
74 buildingGraphicalCut =
true;
79 }
else if (buildingGraphicalCut && currentGraphicalCut) {
95 err.SetDescription(filename);
Global reader for GUI sessions.
#define GRAPHICAL_CUT_KEY
#define REGISTER_GLOBAL_READER(clazz, ext)
std::map< std::string, Diana::QObject * > * fQObjectCache
std::string GetString(const std::string &name) const
std::ifstream fGuiSessionFile
const Diana::QObject * GetQObject(const std::string &name, const std::string &className, QError &err) const
QError Close()
Close file, called by QGlobalReaderDispatcher.
QError Open(const std::string &filename, const std::string &opt="")
Open file, called by QGlobalReaderDispatcher.
error class with error type and description
Base class for GUI graphical cuts. This class has minimal dependencies on other GUI classes so it is ...
void SetProperty(const std::string &key, const std::string &value)
Set property (used for opening a session)
Abstract class for global readers.
const std::string & GetName() const
string wrapped into a QObject
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...