9 |
9 |
10 from PyQt4.QtGui import * |
10 from PyQt4.QtGui import * |
11 from PyQt4.QtCore import * |
11 from PyQt4.QtCore import * |
12 from PyQt4.QtHelp import QHelpEngineCore |
12 from PyQt4.QtHelp import QHelpEngineCore |
13 |
13 |
14 from E5Gui import E5MessageBox |
14 from E5Gui import E5MessageBox, E5FileDialog |
15 |
15 |
16 from .Ui_QtHelpDocumentationDialog import Ui_QtHelpDocumentationDialog |
16 from .Ui_QtHelpDocumentationDialog import Ui_QtHelpDocumentationDialog |
17 |
17 |
18 class QtHelpDocumentationDialog(QDialog, Ui_QtHelpDocumentationDialog): |
18 class QtHelpDocumentationDialog(QDialog, Ui_QtHelpDocumentationDialog): |
19 """ |
19 """ |
51 @pyqtSlot() |
51 @pyqtSlot() |
52 def on_addButton_clicked(self): |
52 def on_addButton_clicked(self): |
53 """ |
53 """ |
54 Private slot to add documents to the help database. |
54 Private slot to add documents to the help database. |
55 """ |
55 """ |
56 fileNames = QFileDialog.getOpenFileNames( |
56 fileNames = E5FileDialog.getOpenFileNames( |
57 self, |
57 self, |
58 self.trUtf8("Add Documentation"), |
58 self.trUtf8("Add Documentation"), |
59 "", |
59 "", |
60 self.trUtf8("Qt Compressed Help Files (*.qch)"), |
60 self.trUtf8("Qt Compressed Help Files (*.qch)")) |
61 QFileDialog.DontUseNativeDialog) |
|
62 if not fileNames: |
61 if not fileNames: |
63 return |
62 return |
64 |
63 |
65 for fileName in fileNames: |
64 for fileName in fileNames: |
66 ns = QHelpEngineCore.namespaceName(fileName) |
65 ns = QHelpEngineCore.namespaceName(fileName) |