Changeset View
Changeset View
Standalone View
Standalone View
conf/okular.kcfg
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 83 | <code> | |||
---|---|---|---|---|---|
112 | } | 112 | } | ||
113 | else | 113 | else | ||
114 | { | 114 | { | ||
115 | qWarning() << "Unable to open AnnotatingTools XML definition"; | 115 | qWarning() << "Unable to open AnnotatingTools XML definition"; | ||
116 | } | 116 | } | ||
117 | </code> | 117 | </code> | ||
118 | <default code="true">annotationTools</default> | 118 | <default code="true">annotationTools</default> | ||
119 | </entry> | 119 | </entry> | ||
120 | <entry key="QuickAnnotationTools" type="StringList"> | ||||
121 | <code> | ||||
122 | QStringList quickAnnotationTools; | ||||
123 | // load the default tool list from the 'xml tools definition' file | ||||
124 | QFile quickAnnFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "okular/toolsQuick.xml") ); | ||||
125 | if ( quickAnnFile.exists() && quickAnnFile.open( QIODevice::ReadOnly ) ) | ||||
126 | { | ||||
127 | QDomDocument doc; | ||||
128 | if ( doc.setContent( &quickAnnFile ) ) | ||||
129 | { | ||||
130 | QDomElement toolsDefinition = doc.elementsByTagName("quickAnnotatingTools").item( 0 ).toElement(); | ||||
131 | // create the quickAnnotationTools list from the XML dom tree | ||||
132 | QDomNode toolDescription = toolsDefinition.firstChild(); | ||||
133 | while ( toolDescription.isElement() ) | ||||
134 | { | ||||
135 | QDomElement toolElement = toolDescription.toElement(); | ||||
136 | if ( toolElement.tagName() == "tool" ) | ||||
137 | { | ||||
138 | QDomDocument temp; | ||||
139 | temp.appendChild( temp.importNode( toolElement, true) ); | ||||
140 | // add each <tool>...</tool> as XML string | ||||
141 | quickAnnotationTools << temp.toString(-1); | ||||
142 | } | ||||
143 | toolDescription = toolDescription.nextSibling(); | ||||
144 | } | ||||
145 | } | ||||
146 | else | ||||
147 | { | ||||
148 | qWarning() << "QuickAnnotatingTools XML file seems to be damaged"; | ||||
149 | } | ||||
150 | } | ||||
151 | else | ||||
152 | { | ||||
153 | qWarning() << "Unable to open QuickAnnotatingTools XML definition"; | ||||
154 | } | ||||
155 | </code> | ||||
156 | <default code="true">quickAnnotationTools</default> | ||||
157 | </entry> | ||||
158 | <entry key="AnnotationContinuousMode" type="Bool"> | ||||
159 | <default>true</default> | ||||
160 | </entry> | ||||
120 | </group> | 161 | </group> | ||
121 | <group name="Zoom"> | 162 | <group name="Zoom"> | ||
122 | <entry key="ZoomMode" type="UInt" > | 163 | <entry key="ZoomMode" type="UInt" > | ||
123 | <default>1</default> | 164 | <default>1</default> | ||
124 | <max>3</max> | 165 | <max>3</max> | ||
125 | </entry> | 166 | </entry> | ||
126 | </group> | 167 | </group> | ||
127 | <group name="General" > | 168 | <group name="General" > | ||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |