| Class | PDFBrowser::MainWindow |
| In: |
sources/pdfbrowser/treeview.rb
sources/pdfbrowser/browser.rb sources/pdfbrowser/pdfcodeview.rb sources/pdfbrowser/tabview.rb |
| Parent: | Qt::MainWindow |
# File sources/pdfbrowser/browser.rb, line 24
24: def initialize
25: super
26:
27: setWindowTitle(APPNAME)
28: resize 640, 480
29:
30: createTreeView
31: createPdfView
32: createTabView
33: createMenus
34: createPanels
35:
36: setCentralWidget(@hsplitter)
37: end
# File sources/pdfbrowser/browser.rb, line 65
65: def about
66:
67: aboutTxt = "Graphical PDF browser front-end.\n\nDistributed under the GPLv3 license.\n\nCopyright (C) 2009\nGuillaume Delugre, Sogeti-ESEC R&D <guillaume@security-labs.org>\nAll rights reserved.\n"
68:
69: Qt::MessageBox.about(self, "About #{APPNAME}", aboutTxt)
70:
71: end
# File sources/pdfbrowser/browser.rb, line 39
39: def importPDF
40:
41: prompt_passwd = lambda {
42: inputdlg = InputDialog.new(self)
43: inputdlg.setLabelText('Password : ')
44:
45: inputdlg.show
46:
47: password = inputdlg.textValue
48: p password
49:
50: return password
51: }
52:
53: fileName = FileDialog.getOpenFileName(self,
54: "Open PDF document", ENV["HOME"], "PDF documents (*.pdf)"
55: )
56:
57: pdf = PDF.read(fileName,
58: :verbosity => Parser::VERBOSE_INSANE,
59: :ignoreerrors => false,
60: :prompt_password => prompt_passwd
61: )
62:
63: end