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