kuser.h true false false false false false false false false QStringList drawingTools; // load the default tool list from the 'xml tools definition' file QFile infoDrawingFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("okular/drawingtools.xml")) ); if ( infoDrawingFile.exists() && infoDrawingFile.open( QIODevice::ReadOnly ) ) { QDomDocument doc; if ( doc.setContent( &infoDrawingFile ) ) { const QDomElement toolsDefinition = doc.elementsByTagName(QStringLiteral("drawingTools")).item( 0 ).toElement(); // create the annotationTools list from the XML dom tree QDomNode toolDescription = toolsDefinition.firstChild(); while ( toolDescription.isElement() ) { const QDomElement toolElement = toolDescription.toElement(); if ( toolElement.tagName() == QStringLiteral("tool") ) { QDomDocument temp; temp.appendChild( temp.importNode( toolElement, true) ); // add each <tool>...</tool> as XML string drawingTools << temp.toString(-1); } toolDescription = toolDescription.nextSibling(); } } else { qWarning() << "DrawingTools XML file seems to be damaged"; } } else { qWarning() << "Unable to open DrawingTools XML definition"; } drawingTools QStringList builtinAnnotationTools; // load the default tool list from the 'xml tools definition' file QFile infoFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("okular/tools.xml")) ); if ( infoFile.exists() && infoFile.open( QIODevice::ReadOnly ) ) { QDomDocument doc; if ( doc.setContent( &infoFile ) ) { QDomElement toolsDefinition = doc.elementsByTagName(QStringLiteral("annotatingTools")).item( 0 ).toElement(); // create the builtinAnnotationTools list from the XML dom tree QDomNode toolDescription = toolsDefinition.firstChild(); while ( toolDescription.isElement() ) { QDomElement toolElement = toolDescription.toElement(); if ( toolElement.tagName() == QStringLiteral("tool") ) { QDomDocument temp; temp.appendChild( temp.importNode( toolElement, true) ); // add each <tool>...</tool> as XML string builtinAnnotationTools << temp.toString(-1); } toolDescription = toolDescription.nextSibling(); } } else { qWarning() << "AnnotatingTools XML file seems to be damaged"; } } else { qWarning() << "Unable to open AnnotatingTools XML definition"; } builtinAnnotationTools QStringList quickAnnotationTools; // load the default tool list from the 'xml tools definition' file QFile quickAnnFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("okular/toolsQuick.xml")) ); if ( quickAnnFile.exists() && quickAnnFile.open( QIODevice::ReadOnly ) ) { QDomDocument doc; if ( doc.setContent( &quickAnnFile ) ) { QDomElement toolsDefinition = doc.elementsByTagName(QStringLiteral("quickAnnotatingTools")).item( 0 ).toElement(); // create the quickAnnotationTools list from the XML dom tree QDomNode toolDescription = toolsDefinition.firstChild(); while ( toolDescription.isElement() ) { QDomElement toolElement = toolDescription.toElement(); if ( toolElement.tagName() == QStringLiteral("tool") ) { QDomDocument temp; temp.appendChild( temp.importNode( toolElement, true) ); // add each <tool>...</tool> as XML string quickAnnotationTools << temp.toString(-1); } toolDescription = toolDescription.nextSibling(); } } else { qWarning() << "QuickAnnotatingTools XML file seems to be damaged"; } } else { qWarning() << "Unable to open QuickAnnotatingTools XML definition"; } quickAnnotationTools true 0 1 3 false true true true true false Name speechd true Qt::black Replace HiddenDelay true false -2 -2 20 true false false true true false true true true 48 0 true true 0 0 50 3 1 8 false true true FullAnnotationToolBar Single None Browse false false false true true false false 0x600000 0xF0F0F0 127 2 253 2 2 6 KUser currentUser; QString userString = currentUser.property( KUser::FullName ).toString(); if ( userString.isEmpty() ) { userString = currentUser.loginName(); } userString