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