|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2015 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to show the 'whois' information. |
|
8 """ |
|
9 |
|
10 from PyQt5.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_VirusTotalWhoisDialog import Ui_VirusTotalWhoisDialog |
|
13 |
|
14 import UI.PixmapCache |
|
15 |
|
16 |
|
17 class VirusTotalWhoisDialog(QDialog, Ui_VirusTotalWhoisDialog): |
|
18 """ |
|
19 Class implementing a dialog to show the 'whois' information. |
|
20 """ |
|
21 def __init__(self, domain, whois, parent=None): |
|
22 """ |
|
23 Constructor |
|
24 |
|
25 @param domain domain name |
|
26 @type str |
|
27 @param whois whois information |
|
28 @type str |
|
29 @param parent reference to the parent widget |
|
30 @type QWidget |
|
31 """ |
|
32 super(VirusTotalWhoisDialog, self).__init__(parent) |
|
33 self.setupUi(self) |
|
34 |
|
35 self.headerLabel.setText( |
|
36 self.tr("<b>Whois information for domain {0}</b>").format(domain)) |
|
37 self.headerPixmap.setPixmap( |
|
38 UI.PixmapCache.getPixmap("virustotal.png")) |
|
39 self.whoisEdit.setPlainText(whois) |