54 fm = QFontMetrics(f) |
54 fm = QFontMetrics(f) |
55 height = fm.height() + fm.height() // 3 |
55 height = fm.height() + fm.height() // 3 |
56 self.exceptionsTable.verticalHeader().setDefaultSectionSize(height) |
56 self.exceptionsTable.verticalHeader().setDefaultSectionSize(height) |
57 self.exceptionsTable.verticalHeader().setMinimumSectionSize(-1) |
57 self.exceptionsTable.verticalHeader().setMinimumSectionSize(-1) |
58 for section in range(self.__exceptionsModel.columnCount()): |
58 for section in range(self.__exceptionsModel.columnCount()): |
59 header = self.exceptionsTable.horizontalHeader()\ |
59 header = self.exceptionsTable.horizontalHeader().sectionSizeHint( |
60 .sectionSizeHint(section) |
60 section) |
61 if section == 0: |
61 if section == 0: |
62 header = fm.width("averagebiglonghost.averagedomain.info") |
62 header = fm.width("averagebiglonghost.averagedomain.info") |
63 elif section == 1: |
63 elif section == 1: |
64 header = fm.width(self.tr("Allow For Session")) |
64 header = fm.width(self.tr("Allow For Session")) |
65 buffer = fm.width("mm") |
65 buffer = fm.width("mm") |
66 header += buffer |
66 header += buffer |
67 self.exceptionsTable.horizontalHeader()\ |
67 self.exceptionsTable.horizontalHeader().resizeSection( |
68 .resizeSection(section, header) |
68 section, header) |
69 |
69 |
70 def setDomainName(self, domain): |
70 def setDomainName(self, domain): |
71 """ |
71 """ |
72 Public method to set the domain to be displayed. |
72 Public method to set the domain to be displayed. |
73 |
73 |