Rev 872 | Rev 1092 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
564 | cbradney | 1 | /*************************************************************************** |
2 | * Copyright (C) 2004 by Craig Bradney * |
||
3 | * cbradney@zip.com.au * |
||
4 | * * |
||
5 | * This program is free software; you can redistribute it and/or modify * |
||
6 | * it under the terms of the GNU General Public License as published by * |
||
7 | * the Free Software Foundation; either version 2 of the License, or * |
||
8 | * (at your option) any later version. * |
||
9 | * * |
||
10 | * This program is distributed in the hope that it will be useful, * |
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
13 | * GNU General Public License for more details. * |
||
14 | * * |
||
15 | * You should have received a copy of the GNU General Public License * |
||
16 | * along with this program; if not, write to the * |
||
17 | * Free Software Foundation, Inc., * |
||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
19 | ***************************************************************************/ |
||
560 | cbradney | 20 | |
3 | paul | 21 | #include "helpbrowser.h" |
22 | #include "helpbrowser.moc" |
||
560 | cbradney | 23 | |
3 | paul | 24 | #include <qvariant.h> |
560 | cbradney | 25 | #include <qpushbutton.h> |
26 | #include <qtabwidget.h> |
||
27 | #include <qwidget.h> |
||
28 | #include <qheader.h> |
||
29 | #include <qlistview.h> |
||
30 | #include <qtextbrowser.h> |
||
31 | #include <qlayout.h> |
||
3 | paul | 32 | #include <qtooltip.h> |
560 | cbradney | 33 | #include <qtoolbutton.h> |
34 | #include <qwhatsthis.h> |
||
3 | paul | 35 | #include <qimage.h> |
36 | #include <qpixmap.h> |
||
560 | cbradney | 37 | #include <qpopupmenu.h> |
38 | #include <qfileinfo.h> |
||
3 | paul | 39 | #include <qtextcodec.h> |
560 | cbradney | 40 | #include <qdom.h> |
1033 | cbradney | 41 | #include <qdir.h> |
786 | cbradney | 42 | #include <qsplitter.h> |
128 | Franz | 43 | |
617 | cbradney | 44 | #ifdef _MSC_VER |
1033 | cbradney | 45 | #if (_MSC_VER >= 1200) |
46 | #include "win-config.h" |
||
47 | #endif |
||
128 | Franz | 48 | #else |
1033 | cbradney | 49 | #include "config.h" |
128 | Franz | 50 | #endif |
51 | |||
3 | paul | 52 | extern QPixmap loadIcon(QString nam); |
53 | |||
560 | cbradney | 54 | |
564 | cbradney | 55 | HelpBrowser::HelpBrowser( QWidget* parent, QString caption, QString guiLanguage, QString jumpToSection, QString jumpToFile) |
56 | : QWidget( parent, "Help", WType_TopLevel | WDestructiveClose ) |
||
3 | paul | 57 | { |
560 | cbradney | 58 | QString fileName; |
564 | cbradney | 59 | mHistory.clear(); |
60 | struct histd his; |
||
3 | paul | 61 | |
564 | cbradney | 62 | helpBrowsermainLayout = new QVBoxLayout( this); |
63 | buttonLayout = new QHBoxLayout; |
||
64 | buttonLayout->setSpacing( 6 ); |
||
65 | buttonLayout->setMargin( 2 ); |
||
3 | paul | 66 | |
564 | cbradney | 67 | homeButton = new QToolButton( this, "homeButton" ); |
68 | homeButton->setText( "" ); |
||
69 | homeButton->setPixmap(loadIcon("gohome.png")); |
||
786 | cbradney | 70 | homeButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, homeButton->sizePolicy().hasHeightForWidth() ) ); |
564 | cbradney | 71 | buttonLayout->addWidget( homeButton ); |
3 | paul | 72 | |
564 | cbradney | 73 | histMenu = new QPopupMenu( this ); |
74 | backButton = new QToolButton( this, "backButton" ); |
||
75 | backButton->setPixmap(loadIcon("back.png")); |
||
786 | cbradney | 76 | backButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, backButton->sizePolicy().hasHeightForWidth() ) ); |
564 | cbradney | 77 | backButton->setPopup(histMenu); |
78 | backButton->setPopupDelay(0); |
||
79 | buttonLayout->addWidget( backButton ); |
||
3 | paul | 80 | |
564 | cbradney | 81 | forwButton = new QToolButton( this, "forwButton" ); |
82 | forwButton->setPixmap(loadIcon("forward.png")); |
||
786 | cbradney | 83 | forwButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, forwButton->sizePolicy().hasHeightForWidth() ) ); |
564 | cbradney | 84 | buttonLayout->addWidget( forwButton ); |
85 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
||
86 | buttonLayout->addItem( spacer ); |
||
560 | cbradney | 87 | helpBrowsermainLayout->addLayout( buttonLayout ); |
88 | |||
564 | cbradney | 89 | helpBrowserLayout = new QHBoxLayout; |
786 | cbradney | 90 | splitter = new QSplitter(this, "splitter"); |
91 | splitter->setChildrenCollapsible( false ); |
||
92 | helpBrowserLayout->addWidget( splitter ); |
||
560 | cbradney | 93 | |
786 | cbradney | 94 | tabWidget = new QTabWidget( splitter, "tabWidget" ); |
95 | //tabWidget = new QTabWidget( this, "tabWidget" ); |
||
96 | splitter->setResizeMode(tabWidget, QSplitter::Stretch ); |
||
97 | tabWidget->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Expanding, false) ); |
||
564 | cbradney | 98 | tabContents = new QWidget( tabWidget, "tabContents" ); |
99 | tabLayout = new QHBoxLayout( tabContents, 11, 6, "tabLayout"); |
||
560 | cbradney | 100 | |
564 | cbradney | 101 | listView = new QListView( tabContents, "listView" ); |
102 | listView->addColumn( tr( "Contents" ) ); |
||
103 | listView->addColumn( tr( "Link" ) , 0 ); |
||
786 | cbradney | 104 | listView->setColumnWidthMode( 0, QListView::Maximum ); |
105 | listView->setColumnWidthMode( 1, QListView::Manual ); |
||
560 | cbradney | 106 | listView->setSorting(-1,-1); |
107 | listView->setRootIsDecorated( true ); |
||
108 | listView->setSelectionMode(QListView::Single); |
||
109 | listView->setDefaultRenameAction(QListView::Reject); |
||
110 | listView->clear(); |
||
564 | cbradney | 111 | tabLayout->addWidget( listView ); |
112 | |||
113 | tabWidget->insertTab( tabContents, QString("Contents") ); |
||
786 | cbradney | 114 | //helpBrowserLayout->addWidget( tabWidget ); |
560 | cbradney | 115 | |
786 | cbradney | 116 | textBrowser = new QTextBrowser( splitter, "textBrowser" ); |
117 | splitter->setResizeMode(textBrowser, QSplitter::Stretch); |
||
118 | //textBrowser = new QTextBrowser( this, "textBrowser" ); |
||
119 | textBrowser->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Expanding, false ) ); |
||
564 | cbradney | 120 | textBrowser->setFrameShape( QTextBrowser::StyledPanel ); |
786 | cbradney | 121 | //helpBrowserLayout->addWidget( textBrowser ); |
564 | cbradney | 122 | helpBrowsermainLayout->addLayout( helpBrowserLayout ); |
560 | cbradney | 123 | |
564 | cbradney | 124 | languageChange(); |
125 | resize( QSize(602, 491).expandedTo(minimumSizeHint()) ); |
||
126 | clearWState( WState_Polished ); |
||
786 | cbradney | 127 | loadMenu( guiLanguage ); |
560 | cbradney | 128 | listView->header()->hide(); |
564 | cbradney | 129 | jumpToHelpSection( guiLanguage, jumpToSection, jumpToFile ); |
560 | cbradney | 130 | |
131 | connect( homeButton, SIGNAL( clicked() ), textBrowser, SLOT( home() ) ); |
||
132 | connect( forwButton, SIGNAL( clicked() ), textBrowser, SLOT( forward() ) ); |
||
133 | connect( backButton, SIGNAL( clicked() ), textBrowser, SLOT( backward() ) ); |
||
564 | cbradney | 134 | connect( histMenu, SIGNAL(activated(int)), this, SLOT(histChosen(int))); |
135 | connect( listView, SIGNAL(clicked( QListViewItem *)), this, SLOT(itemSelected( QListViewItem *))); |
||
560 | cbradney | 136 | } |
137 | |||
138 | HelpBrowser::~HelpBrowser() |
||
139 | { |
||
564 | cbradney | 140 | // no need to delete child widgets, Qt does it all for us |
560 | cbradney | 141 | } |
142 | |||
143 | void HelpBrowser::languageChange() |
||
144 | { |
||
564 | cbradney | 145 | setCaption( tr( "Scribus Online Help" ) ); |
146 | listView->header()->setLabel( 0, tr( "Contents" ) ); |
||
147 | listView->clear(); |
||
560 | cbradney | 148 | |
564 | cbradney | 149 | tabWidget->changeTab( tabContents, tr( "Contents" ) ); |
560 | cbradney | 150 | } |
151 | |||
152 | |||
153 | void HelpBrowser::sourceChanged(const QString& url) |
||
154 | { |
||
564 | cbradney | 155 | bool inList = false; |
156 | struct histd his; |
||
157 | QString title = ""; |
||
158 | title = textBrowser->documentTitle(); |
||
159 | if (title == "") |
||
160 | title = url; |
||
786 | cbradney | 161 | for (QMap<int, histd>::Iterator it = mHistory.begin(); it != mHistory.end(); ++it) |
564 | cbradney | 162 | { |
163 | if (it.data().Title == title) |
||
164 | inList = true; |
||
165 | } |
||
166 | if (!inList) |
||
167 | { |
||
168 | his.Title = title; |
||
169 | his.Url = url; |
||
170 | mHistory[histMenu->insertItem(title)] = his; |
||
171 | } |
||
172 | if (mHistory.count() > 15) |
||
173 | { |
||
174 | int itk = histMenu->idAt(0); |
||
175 | mHistory.remove(itk); |
||
176 | histMenu->removeItem(itk); |
||
177 | } |
||
560 | cbradney | 178 | } |
179 | |||
180 | void HelpBrowser::histChosen(int i) |
||
181 | { |
||
564 | cbradney | 182 | if (mHistory.contains(i)) |
183 | textBrowser->setSource(mHistory[i].Url); |
||
560 | cbradney | 184 | } |
185 | |||
786 | cbradney | 186 | void HelpBrowser::jumpToHelpSection(const QString newGuiLanguage, QString jumpToSection, QString jumpToFile) |
560 | cbradney | 187 | { |
188 | QString toLoad; |
||
1033 | cbradney | 189 | QString guiLanguage = newGuiLanguage=="" ? "en" : newGuiLanguage.left(2); |
560 | cbradney | 190 | |
564 | cbradney | 191 | if (jumpToFile=="") |
192 | { |
||
872 | cbradney | 193 | QString pfad = DOCDIR; |
1033 | cbradney | 194 | toLoad = pfad + guiLanguage + "/"; //clean this later to handle 5 char locales |
564 | cbradney | 195 | if (jumpToSection=="") |
196 | { |
||
560 | cbradney | 197 | toLoad+="index.html"; |
198 | listView->setSelected( listView->firstChild(), true ); |
||
205 | Franz | 199 | } |
564 | cbradney | 200 | else if (jumpToSection=="scripter") |
201 | { |
||
560 | cbradney | 202 | toLoad+="scripter1.html"; |
203 | QListViewItemIterator it(listView); |
||
564 | cbradney | 204 | while (it.current()) |
205 | { |
||
560 | cbradney | 206 | if (it.current()->text(1)=="scripter1.html") |
207 | listView->setSelected( it.current(), true ); |
||
208 | if (it.current()->text(1)=="developers.html") |
||
209 | it.current()->setOpen( true ); |
||
210 | ++it; |
||
211 | } |
||
212 | } |
||
205 | Franz | 213 | } |
560 | cbradney | 214 | else |
564 | cbradney | 215 | toLoad=jumpToFile; |
3 | paul | 216 | |
560 | cbradney | 217 | loadHelp(toLoad); |
3 | paul | 218 | } |
219 | |||
560 | cbradney | 220 | void HelpBrowser::loadHelp(QString filename) |
68 | Franz | 221 | { |
75 | Franz | 222 | struct histd his; |
564 | cbradney | 223 | bool Avail = true; |
560 | cbradney | 224 | QString toLoad; |
564 | cbradney | 225 | QFileInfo fi; |
226 | fi = QFileInfo(filename); |
||
227 | if (fi.exists()) |
||
560 | cbradney | 228 | toLoad=filename; |
564 | cbradney | 229 | else |
230 | { |
||
872 | cbradney | 231 | QString pfad = DOCDIR; |
232 | toLoad = pfad + "en/index.html"; |
||
564 | cbradney | 233 | fi = QFileInfo(toLoad); |
234 | if (!fi.exists()) |
||
235 | { |
||
236 | textBrowser->setText("<h2>"+ tr("Sorry, no manual available! Please see: http://docs.scribus.net for updated docs\nand www.scribus.net for downloads.")+"</h2>"); |
||
237 | Avail = false; |
||
238 | } |
||
239 | } |
||
240 | if (Avail) |
||
241 | { |
||
242 | textBrowser->setSource(toLoad); |
||
243 | his.Title = textBrowser->documentTitle(); |
||
244 | if (his.Title == "") |
||
245 | his.Title = toLoad; |
||
246 | his.Url = toLoad; |
||
247 | mHistory[histMenu->insertItem(his.Title)] = his; |
||
248 | } |
||
560 | cbradney | 249 | } |
250 | |||
786 | cbradney | 251 | void HelpBrowser::loadMenu(const QString newGuiLanguage) |
560 | cbradney | 252 | { |
872 | cbradney | 253 | QString pfad = DOCDIR; |
786 | cbradney | 254 | QString toLoad; |
1033 | cbradney | 255 | QString guiLanguage = newGuiLanguage=="" ? "en" : newGuiLanguage.left(2); |
560 | cbradney | 256 | |
1033 | cbradney | 257 | QString pfad2 = pfad + guiLanguage + "/menu.xml"; |
786 | cbradney | 258 | |
564 | cbradney | 259 | QFileInfo fi = QFileInfo(pfad2); |
786 | cbradney | 260 | |
793 | cbradney | 261 | if (fi.exists()) |
262 | toLoad=pfad2; |
||
263 | else |
||
264 | { |
||
872 | cbradney | 265 | toLoad = pfad + "en/menu.xml"; |
1033 | cbradney | 266 | guiLanguage="en"; |
786 | cbradney | 267 | fi = QFileInfo(toLoad); |
268 | qDebug("Scribus help in your selected language does not exist, trying English. Otherwise, please visit http://docs.scribus.net."); |
||
269 | } |
||
270 | |||
560 | cbradney | 271 | if (fi.exists()) |
564 | cbradney | 272 | { |
560 | cbradney | 273 | QDomDocument doc( "menuentries" ); |
786 | cbradney | 274 | QFile file( toLoad ); |
560 | cbradney | 275 | if ( !file.open( IO_ReadOnly ) ) |
276 | return; |
||
564 | cbradney | 277 | if ( !doc.setContent( &file ) ) |
278 | { |
||
560 | cbradney | 279 | file.close(); |
280 | return; |
||
281 | } |
||
282 | file.close(); |
||
283 | |||
284 | QDomElement docElem = doc.documentElement(); |
||
285 | QDomNode n = docElem.firstChild(); |
||
286 | QListViewItem *qlvi=NULL, *qlvi2=NULL, *qlvi3=NULL, *qlvi4=NULL, *qlvi5=NULL, *qlvi6=NULL; |
||
1033 | cbradney | 287 | QListViewItem *tutorialsMenuItem; |
288 | bool haveTutorials=false; |
||
560 | cbradney | 289 | |
564 | cbradney | 290 | while( !n.isNull() ) |
291 | { |
||
560 | cbradney | 292 | QDomElement e = n.toElement(); // try to convert the node to an element. |
564 | cbradney | 293 | if( !e.isNull() ) |
294 | { |
||
295 | if (e.hasAttribute( "text" ) && e.hasAttribute( "file" )) |
||
296 | { |
||
560 | cbradney | 297 | QDomAttr textAttr = e.attributeNode( "text" ); |
298 | QDomAttr fileAttr = e.attributeNode( "file" ); |
||
299 | if (qlvi2==NULL) |
||
300 | qlvi=new QListViewItem(listView, textAttr.value(), fileAttr.value()); |
||
564 | cbradney | 301 | else |
1033 | cbradney | 302 | qlvi=new QListViewItem(listView, qlvi2, textAttr.value(), fileAttr.value()); |
303 | if (qlvi!=NULL && textAttr.value()=="Tutorials") |
||
564 | cbradney | 304 | { |
1033 | cbradney | 305 | haveTutorials=true; |
306 | tutorialsMenuItem=qlvi; |
||
560 | cbradney | 307 | } |
1033 | cbradney | 308 | |
560 | cbradney | 309 | if (qlvi!=NULL) |
310 | qlvi2=qlvi; |
||
311 | } |
||
312 | |||
313 | QDomNodeList nl=n.childNodes(); |
||
564 | cbradney | 314 | for(uint i=0 ; i<= nl.count() ; i++) |
315 | { |
||
560 | cbradney | 316 | QDomNode child=nl.item(i); |
564 | cbradney | 317 | if (child.isElement()) |
318 | { |
||
560 | cbradney | 319 | QDomElement ec = child.toElement(); |
564 | cbradney | 320 | if (!ec.isNull()) |
321 | { |
||
322 | if (ec.hasAttribute( "text" ) && ec.hasAttribute( "file" )) |
||
323 | { |
||
560 | cbradney | 324 | QDomAttr textAttr = ec.attributeNode( "text" ); |
325 | QDomAttr fileAttr = ec.attributeNode( "file" ); |
||
326 | if (qlvi4==NULL) |
||
327 | qlvi3=new QListViewItem(qlvi, textAttr.value(), fileAttr.value()); |
||
564 | cbradney | 328 | else |
1033 | cbradney | 329 | qlvi3=new QListViewItem(qlvi, qlvi4, textAttr.value(), fileAttr.value()); |
330 | if (qlvi3!=NULL && textAttr.value()=="Tutorials") |
||
564 | cbradney | 331 | { |
1033 | cbradney | 332 | haveTutorials=true; |
333 | tutorialsMenuItem=qlvi3; |
||
560 | cbradney | 334 | } |
335 | if (qlvi3!=NULL) |
||
336 | qlvi4=qlvi3; |
||
337 | } |
||
338 | //3rd level |
||
339 | QDomNodeList nl2=child.childNodes(); |
||
564 | cbradney | 340 | for(uint i=0 ; i<= nl2.count() ; i++) |
341 | { |
||
560 | cbradney | 342 | QDomNode childchild=nl2.item(i); |
564 | cbradney | 343 | if (childchild.isElement()) |
344 | { |
||
560 | cbradney | 345 | QDomElement ecc = childchild.toElement(); |
564 | cbradney | 346 | if (!ecc.isNull()) |
347 | { |
||
348 | if (ecc.hasAttribute( "text" ) && ecc.hasAttribute( "file" )) |
||
349 | { |
||
560 | cbradney | 350 | QDomAttr textAttr = ecc.attributeNode( "text" ); |
351 | QDomAttr fileAttr = ecc.attributeNode( "file" ); |
||
352 | if (qlvi6==NULL) |
||
353 | qlvi5=new QListViewItem(qlvi3, textAttr.value(), fileAttr.value()); |
||
564 | cbradney | 354 | else |
1033 | cbradney | 355 | qlvi5=new QListViewItem(qlvi3, qlvi6, textAttr.value(), fileAttr.value()); |
356 | if (qlvi5!=NULL && textAttr.value()=="Tutorials") |
||
564 | cbradney | 357 | { |
1033 | cbradney | 358 | haveTutorials=true; |
359 | tutorialsMenuItem=qlvi5; |
||
560 | cbradney | 360 | } |
361 | } |
||
362 | if (qlvi5!=NULL) |
||
363 | qlvi6=qlvi5; |
||
364 | } |
||
365 | } |
||
366 | } |
||
367 | } |
||
368 | } |
||
369 | } |
||
370 | } |
||
371 | n = n.nextSibling(); |
||
372 | } |
||
1033 | cbradney | 373 | //scan for installed tutorials |
374 | if (haveTutorials) |
||
375 | { |
||
376 | QString path = DOCDIR; |
||
377 | path += guiLanguage + "/tutorials/"; |
||
378 | QDir dir(path, "*", QDir::Name, QDir::Dirs | QDir::NoSymLinks); |
||
379 | |||
380 | if (dir.exists() && (dir.count() != 0)) |
||
381 | { |
||
382 | for (uint i = 0; i < dir.count(); ++i) |
||
383 | { |
||
384 | if (dir[i]!="." && dir[i]!="..") |
||
385 | { |
||
386 | QFileInfo file(path + dir[i] + "/menu.xml"); |
||
387 | if (file.exists()) // menu.xml exists for tutorial |
||
388 | { |
||
389 | QDomDocument docTutorial( "tutorialmenuentries" ); |
||
390 | QFile fileTutorialMenu( file.filePath() ); |
||
391 | if ( !fileTutorialMenu.open( IO_ReadOnly ) ) |
||
392 | break; |
||
393 | if ( !docTutorial.setContent( &fileTutorialMenu ) ) |
||
394 | { |
||
395 | fileTutorialMenu.close(); |
||
396 | break; |
||
397 | } |
||
398 | fileTutorialMenu.close(); |
||
399 | |||
400 | QDomElement docElemTutorial = docTutorial.documentElement(); |
||
401 | QDomNode nTutorial = docElemTutorial.firstChild(); |
||
402 | QListViewItem *tutorialQLVI=NULL; |
||
403 | |||
404 | while( !nTutorial.isNull() ) |
||
405 | { |
||
406 | QDomElement eTutorial = nTutorial.toElement(); // try to convert the node to an element. |
||
407 | if( !eTutorial.isNull() ) |
||
408 | { |
||
409 | if (tutorialsMenuItem!=NULL && eTutorial.hasAttribute( "text" ) && eTutorial.hasAttribute( "file" )) |
||
410 | { |
||
411 | QDomAttr textAttr = eTutorial.attributeNode( "text" ); |
||
412 | QDomAttr fileAttr = eTutorial.attributeNode( "file" ); |
||
413 | tutorialQLVI=new QListViewItem(tutorialsMenuItem, textAttr.value(), fileAttr.value()); |
||
414 | } |
||
415 | QDomNodeList nl=nTutorial.childNodes(); |
||
416 | QListViewItem *tutorialSubMenuItem, *tutorialSubMenuItemLast=NULL; |
||
417 | for(uint i=0 ; i<= nl.count() ; i++) |
||
418 | { |
||
419 | QDomNode child=nl.item(i); |
||
420 | if (child.isElement()) |
||
421 | { |
||
422 | QDomElement ec = child.toElement(); |
||
423 | if (!ec.isNull()) |
||
424 | { |
||
425 | if (ec.hasAttribute( "text" ) && ec.hasAttribute( "file" )) |
||
426 | { |
||
427 | QDomAttr textAttr = ec.attributeNode( "text" ); |
||
428 | QDomAttr fileAttr = ec.attributeNode( "file" ); |
||
429 | if (tutorialSubMenuItemLast==NULL) |
||
430 | tutorialSubMenuItem=new QListViewItem(tutorialQLVI, textAttr.value(), fileAttr.value()); |
||
431 | else |
||
432 | tutorialSubMenuItem=new QListViewItem(tutorialQLVI, tutorialSubMenuItemLast, textAttr.value(), fileAttr.value()); |
||
433 | if (tutorialSubMenuItem!=NULL) |
||
434 | tutorialSubMenuItemLast=tutorialSubMenuItem; |
||
435 | } |
||
436 | } |
||
437 | } |
||
438 | } |
||
439 | } |
||
440 | nTutorial = nTutorial.nextSibling(); |
||
441 | } |
||
442 | } |
||
443 | } |
||
444 | } |
||
445 | } |
||
446 | |||
447 | } |
||
205 | Franz | 448 | } |
68 | Franz | 449 | } |
450 | |||
560 | cbradney | 451 | void HelpBrowser::itemSelected(QListViewItem *item) |
68 | Franz | 452 | { |
560 | cbradney | 453 | if ( !item ) |
454 | return; |
||
1033 | cbradney | 455 | if (item->text(1)!=QString::null) |
456 | { |
||
457 | QString pfad = DOCDIR; |
||
872 | cbradney | 458 | loadHelp(pfad + "en/"+item->text(1)); |
1033 | cbradney | 459 | } |
68 | Franz | 460 | } |