Пример #1
0
    def __init__ (self, parent=None):
        QWidget.__init__(self, parent)
        self.setWindowTitle(FRIENDLYNAME)
        self.resize(500, 400)

        if os.getuid() != 0:
            self.warnPerm()

        self.mainLayout = QVBoxLayout(self)
        self.mainTab = QTabWidget()
        self.bottomHBox = QHBoxLayout()

        self.aboutButton = QPushButton(_("About"))
        self.connect(self.aboutButton, SIGNAL("clicked()"),
                        self.showAbout)

        self.quitButton = QPushButton(_("Quit"))
        self.connect(self.quitButton, SIGNAL("clicked()"),
                        qApp, SLOT("quit()"))

        self.mainLayout.addWidget(self.mainTab)
        self.mainLayout.addLayout(self.bottomHBox)

        self.bottomHBox.addStretch(1)
        self.bottomHBox.addWidget(self.aboutButton)
        self.bottomHBox.addWidget(self.quitButton)

        self.tab_init()
Пример #2
0
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setWindowTitle(FRIENDLYNAME)
        self.resize(500, 400)

        if os.getuid() != 0:
            self.warnPerm()

        self.mainLayout = QVBoxLayout(self)
        self.mainTab = QTabWidget()
        self.bottomHBox = QHBoxLayout()

        self.aboutButton = QPushButton(_("About"))
        self.connect(self.aboutButton, SIGNAL("clicked()"), self.showAbout)

        self.quitButton = QPushButton(_("Quit"))
        self.connect(self.quitButton, SIGNAL("clicked()"), qApp,
                     SLOT("quit()"))

        self.mainLayout.addWidget(self.mainTab)
        self.mainLayout.addLayout(self.bottomHBox)

        self.bottomHBox.addStretch(1)
        self.bottomHBox.addWidget(self.aboutButton)
        self.bottomHBox.addWidget(self.quitButton)

        self.tab_init()
Пример #3
0
 def tab_init (self):
     self.tab0 = CPUTab()
     self.mainTab.addTab(self.tab0, _("Processor"))
     self.tab1 = MotherboardTab()
     self.mainTab.addTab(self.tab1, _("Motherboard"))
     self.tab2 = MemoryTab()
     self.mainTab.addTab(self.tab2, _("Memory"))
     self.tab3 = SystemTab()
     self.mainTab.addTab(self.tab3, _("System"))
Пример #4
0
 def tab_init(self):
     self.tab0 = CPUTab()
     self.mainTab.addTab(self.tab0, _("Processor"))
     self.tab1 = MotherboardTab()
     self.mainTab.addTab(self.tab1, _("Motherboard"))
     self.tab2 = MemoryTab()
     self.mainTab.addTab(self.tab2, _("Memory"))
     self.tab3 = SystemTab()
     self.mainTab.addTab(self.tab3, _("System"))
Пример #5
0
 def warnPerm (self):
     QMessageBox.warning(self, "Warning",
             _("<h2>Root privileges are required "
               "for getting some infomation.</h2>"
               "If you want %s to get more detail infomation, "
               "please use root account to run it. "
               "It is safe, the applicaion will not damage your system."
              ) % FRIENDLYNAME)
Пример #6
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("General"), parent)
        self._Global_grid = QGridLayout(self)

        self._Physical_label = QLabel(_("Physical Memory"))
        self._Global_grid.addWidget(self._Physical_label, 0, 0)
        self._Physical_edit = NEBox()
        self._Global_grid.addWidget(self._Physical_edit, 0, 1)

        self._MaxCap_label = QLabel(_("Maximum Capacity"))
        self._Global_grid.addWidget(self._MaxCap_label, 1, 0)
        self._MaxCap_edit = NEBox()
        self._Global_grid.addWidget(self._MaxCap_edit, 1, 1)

        self._Swap_label = QLabel(_("Swap"))
        self._Global_grid.addWidget(self._Swap_label, 2, 0)
        self._Swap_edit = NEBox()
        self._Global_grid.addWidget(self._Swap_edit, 2, 1)
Пример #7
0
 def warnPerm(self):
     QMessageBox.warning(
         self, "Warning",
         _("<h2>Root privileges are required "
           "for getting some infomation.</h2>"
           "If you want %s to get more detail infomation, "
           "please use root account to run it. "
           "It is safe, the applicaion will not damage your system.") %
         FRIENDLYNAME)
Пример #8
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("BIOS"), parent)
        self._Global_grid = QGridLayout(self)

        self._Vendor_label = QLabel(_("Vendor"))
        self._Global_grid.addWidget(self._Vendor_label, 0, 0)
        self._Vendor_edit = NEBox()
        self._Global_grid.addWidget(self._Vendor_edit, 0, 1)

        self._Version_label = QLabel(_("Version"))
        self._Global_grid.addWidget(self._Version_label, 1, 0)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 1)

        self._Date_label = QLabel(_("Date"))
        self._Global_grid.addWidget(self._Date_label, 2, 0)
        self._Date_edit = NEBox()
        self._Global_grid.addWidget(self._Date_edit, 2, 1)
Пример #9
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Python"), parent)
        self._Global_grid = QGridLayout(self)

        self._Implementation_label = QLabel(_("Implementation"))
        self._Global_grid.addWidget(self._Implementation_label, 0, 0)
        self._Implementation_edit = NEBox()
        self._Global_grid.addWidget(self._Implementation_edit, 0, 1)

        self._Version_label = QLabel(_("Version"))
        self._Global_grid.addWidget(self._Version_label, 1, 0)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 1)

        self._PyQtVersion_label = QLabel(_("PyQt4 Version"))
        self._Global_grid.addWidget(self._PyQtVersion_label, 2, 0)
        self._PyQtVersion_edit = NEBox()
        self._Global_grid.addWidget(self._PyQtVersion_edit, 2, 1)
Пример #10
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("BIOS"), parent)
        self._Global_grid = QGridLayout(self)

        self._Vendor_label = QLabel(_("Vendor"))
        self._Global_grid.addWidget(self._Vendor_label, 0, 0)
        self._Vendor_edit = NEBox()
        self._Global_grid.addWidget(self._Vendor_edit, 0, 1)

        self._Version_label = QLabel(_("Version"))
        self._Global_grid.addWidget(self._Version_label, 1, 0)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 1)

        self._Date_label = QLabel(_("Date"))
        self._Global_grid.addWidget(self._Date_label, 2, 0)
        self._Date_edit = NEBox()
        self._Global_grid.addWidget(self._Date_edit, 2, 1)
Пример #11
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Python"), parent)
        self._Global_grid = QGridLayout(self)

        self._Implementation_label = QLabel(_("Implementation"))
        self._Global_grid.addWidget(self._Implementation_label, 0, 0)
        self._Implementation_edit = NEBox()
        self._Global_grid.addWidget(self._Implementation_edit, 0, 1)

        self._Version_label = QLabel(_("Version"))
        self._Global_grid.addWidget(self._Version_label, 1, 0)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 1)

        self._PyQtVersion_label = QLabel(_("PyQt4 Version"))
        self._Global_grid.addWidget(self._PyQtVersion_label, 2, 0)
        self._PyQtVersion_edit = NEBox()
        self._Global_grid.addWidget(self._PyQtVersion_edit, 2, 1)
Пример #12
0
    def __init__ (self, parent=None):
        QWidget.__init__(self, parent)
        self._Global_vbox = QVBoxLayout(self)

        self._Processor_group = ProcessorGroup()
        self._Global_vbox.addWidget(self._Processor_group)

        self._ClockCache_hbox = QHBoxLayout()
        self._Global_vbox.addLayout(self._ClockCache_hbox)

        self._Clock_group = ClockGroup()
        self._ClockCache_hbox.addWidget(self._Clock_group)

        self._Cache_group = CacheGroup()
        self._ClockCache_hbox.addWidget(self._Cache_group)

        self._Select_frame = QFrame()
        self._Global_vbox.addWidget(self._Select_frame)
        self._Select_hbox = QHBoxLayout(self._Select_frame)

        self._Processor_lable = QLabel(_("Processor"))
        self._Select_hbox.addWidget(self._Processor_lable)
        self._Processor_combo = QComboBox()
        for i in range(len(
                    glob.glob("/sys/devices/system/cpu/cpu[0-9]*/"))):
            self._Processor_combo.addItem(_("Processor #%d") % i)
        self.connect(self._Processor_combo, 
                    SIGNAL("currentIndexChanged(int)"),
                    self.changeCPU)
        self._Select_hbox.addWidget(self._Processor_combo)

        self._PhysicalID_lable = QLabel(_("Physical ID"))
        self._Select_hbox.addWidget(self._PhysicalID_lable)
        self._PhysicalID_edit = NEBox()
        self._Select_hbox.addWidget(self._PhysicalID_edit)

        self._CoreID_lable = QLabel(_("Core ID"))
        self._Select_hbox.addWidget(self._CoreID_lable)
        self._CoreID_edit = NEBox()
        self._Select_hbox.addWidget(self._CoreID_edit)

        self._Global_vbox.addStretch(0)

        self.changeCPU(0)
Пример #13
0
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self._Global_vbox = QVBoxLayout(self)

        self._Processor_group = ProcessorGroup()
        self._Global_vbox.addWidget(self._Processor_group)

        self._ClockCache_hbox = QHBoxLayout()
        self._Global_vbox.addLayout(self._ClockCache_hbox)

        self._Clock_group = ClockGroup()
        self._ClockCache_hbox.addWidget(self._Clock_group)

        self._Cache_group = CacheGroup()
        self._ClockCache_hbox.addWidget(self._Cache_group)

        self._Select_frame = QFrame()
        self._Global_vbox.addWidget(self._Select_frame)
        self._Select_hbox = QHBoxLayout(self._Select_frame)

        self._Processor_lable = QLabel(_("Processor"))
        self._Select_hbox.addWidget(self._Processor_lable)
        self._Processor_combo = QComboBox()
        for i in range(len(glob.glob("/sys/devices/system/cpu/cpu[0-9]*/"))):
            self._Processor_combo.addItem(_("Processor #%d") % i)
        self.connect(self._Processor_combo, SIGNAL("currentIndexChanged(int)"),
                     self.changeCPU)
        self._Select_hbox.addWidget(self._Processor_combo)

        self._PhysicalID_lable = QLabel(_("Physical ID"))
        self._Select_hbox.addWidget(self._PhysicalID_lable)
        self._PhysicalID_edit = NEBox()
        self._Select_hbox.addWidget(self._PhysicalID_edit)

        self._CoreID_lable = QLabel(_("Core ID"))
        self._Select_hbox.addWidget(self._CoreID_lable)
        self._CoreID_edit = NEBox()
        self._Select_hbox.addWidget(self._CoreID_edit)

        self._Global_vbox.addStretch(0)

        self.changeCPU(0)
Пример #14
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Motherboard"), parent)
        self._Global_grid = QGridLayout(self)

        self._Vendor_label = QLabel(_("Vendor"))
        self._Global_grid.addWidget(self._Vendor_label, 0, 0)
        self._Vendor_edit = NEBox()
        self._Global_grid.addWidget(self._Vendor_edit, 0, 1, 1, 8)

        self._Model_label = QLabel(_("Model"))
        self._Global_grid.addWidget(self._Model_label, 1, 0)
        self._Model_edit = NEBox()
        self._Global_grid.addWidget(self._Model_edit, 1, 1, 1, 5)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 6, 1, 3)

        self._Serial_label = QLabel(_("Serial"))
        self._Global_grid.addWidget(self._Serial_label, 2, 0)
        self._Serial_edit = NEBox()
        self._Global_grid.addWidget(self._Serial_edit, 2, 1, 1, 8)
Пример #15
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Motherboard"), parent)
        self._Global_grid = QGridLayout(self)

        self._Vendor_label = QLabel(_("Vendor"))
        self._Global_grid.addWidget(self._Vendor_label, 0, 0)
        self._Vendor_edit = NEBox()
        self._Global_grid.addWidget(self._Vendor_edit, 0, 1, 1, 8)

        self._Model_label = QLabel(_("Model"))
        self._Global_grid.addWidget(self._Model_label, 1, 0)
        self._Model_edit = NEBox()
        self._Global_grid.addWidget(self._Model_edit, 1, 1, 1, 5)
        self._Version_edit = NEBox()
        self._Global_grid.addWidget(self._Version_edit, 1, 6, 1, 3)

        self._Serial_label = QLabel(_("Serial"))
        self._Global_grid.addWidget(self._Serial_label, 2, 0)
        self._Serial_edit = NEBox()
        self._Global_grid.addWidget(self._Serial_edit, 2, 1, 1, 8)
Пример #16
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Operating System"), parent)
        self._Global_grid = QGridLayout(self)

        self._Arch_label = QLabel(_("Architecture"))
        self._Global_grid.addWidget(self._Arch_label, 0, 0)
        self._Arch_edit = NEBox()
        self._Global_grid.addWidget(self._Arch_edit, 0, 1)

        self._Kernel_label = QLabel(_("Kernel"))
        self._Global_grid.addWidget(self._Kernel_label, 1, 0)
        self._Kernel_edit = NEBox()
        self._Global_grid.addWidget(self._Kernel_edit, 1, 1)

        self._Dist_label = QLabel(_("Distribution"))
        self._Global_grid.addWidget(self._Dist_label, 2, 0)
        self._Dist_edit = NEBox()
        self._Global_grid.addWidget(self._Dist_edit, 2, 1)

        self._ComputerName_label = QLabel(_("Computer Name"))
        self._Global_grid.addWidget(self._ComputerName_label, 3, 0)
        self._ComputerName_edit = NEBox()
        self._Global_grid.addWidget(self._ComputerName_edit, 3, 1)

        self._libcVersion_label = QLabel(_("C Library"))
        self._Global_grid.addWidget(self._libcVersion_label, 4, 0)
        self._libcVersion_edit = NEBox()
        self._Global_grid.addWidget(self._libcVersion_edit, 4, 1)

        self._GCCVersion_label = QLabel(_("GCC Version"))
        self._Global_grid.addWidget(self._GCCVersion_label, 5, 0)
        self._GCCVersion_edit = NEBox()
        self._Global_grid.addWidget(self._GCCVersion_edit, 5, 1)

        self._XVersion_label = QLabel(_("Xorg Version"))
        self._Global_grid.addWidget(self._XVersion_label, 6, 0)
        self._XVersion_edit = NEBox()
        self._Global_grid.addWidget(self._XVersion_edit, 6, 1)

        self._QtVersion_label = QLabel(_("Qt4 Version"))
        self._Global_grid.addWidget(self._QtVersion_label, 7, 0)
        self._QtVersion_edit = NEBox()
        self._Global_grid.addWidget(self._QtVersion_edit, 7, 1)
Пример #17
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Operating System"), parent)
        self._Global_grid = QGridLayout(self)

        self._Arch_label = QLabel(_("Architecture"))
        self._Global_grid.addWidget(self._Arch_label, 0, 0)
        self._Arch_edit = NEBox()
        self._Global_grid.addWidget(self._Arch_edit, 0, 1)

        self._Kernel_label = QLabel(_("Kernel"))
        self._Global_grid.addWidget(self._Kernel_label, 1, 0)
        self._Kernel_edit = NEBox()
        self._Global_grid.addWidget(self._Kernel_edit, 1, 1)

        self._Dist_label = QLabel(_("Distribution"))
        self._Global_grid.addWidget(self._Dist_label, 2, 0)
        self._Dist_edit = NEBox()
        self._Global_grid.addWidget(self._Dist_edit, 2, 1)

        self._ComputerName_label = QLabel(_("Computer Name"))
        self._Global_grid.addWidget(self._ComputerName_label, 3, 0)
        self._ComputerName_edit = NEBox()
        self._Global_grid.addWidget(self._ComputerName_edit, 3, 1)

        self._libcVersion_label = QLabel(_("C Library"))
        self._Global_grid.addWidget(self._libcVersion_label, 4, 0)
        self._libcVersion_edit = NEBox()
        self._Global_grid.addWidget(self._libcVersion_edit, 4, 1)

        self._GCCVersion_label = QLabel(_("GCC Version"))
        self._Global_grid.addWidget(self._GCCVersion_label, 5, 0)
        self._GCCVersion_edit = NEBox()
        self._Global_grid.addWidget(self._GCCVersion_edit, 5, 1)

        self._XVersion_label = QLabel(_("Xorg Version"))
        self._Global_grid.addWidget(self._XVersion_label, 6, 0)
        self._XVersion_edit = NEBox()
        self._Global_grid.addWidget(self._XVersion_edit, 6, 1)

        self._QtVersion_label = QLabel(_("Qt4 Version"))
        self._Global_grid.addWidget(self._QtVersion_label, 7, 0)
        self._QtVersion_edit = NEBox()
        self._Global_grid.addWidget(self._QtVersion_edit, 7, 1)
Пример #18
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Clock"), parent)
        self._Global_grid = QGridLayout(self)

        self._SpeedReal_label = QLabel(_("Speed (Real)"))
        self._Global_grid.addWidget(self._SpeedReal_label, 0, 0)
        self._SpeedReal_edit = NEBox()
        self._Global_grid.addWidget(self._SpeedReal_edit, 0, 1)

        self._SpeedBIOS_label = QLabel(_("Speed (BIOS)"))
        self._Global_grid.addWidget(self._SpeedBIOS_label, 1, 0)
        self._SpeedBIOS_edit = NEBox()
        self._Global_grid.addWidget(self._SpeedBIOS_edit, 1, 1)

        self._Multiplier_label = QLabel(_("Multiplier"))
        self._Global_grid.addWidget(self._Multiplier_label, 2, 0)
        self._Multiplier_edit = NEBox()
        self._Global_grid.addWidget(self._Multiplier_edit, 2, 1)

        self._ExtClock_label = QLabel(_("Ext. Clock"))
        self._Global_grid.addWidget(self._ExtClock_label, 3, 0)
        self._ExtClock_edit = NEBox()
        self._Global_grid.addWidget(self._ExtClock_edit, 3, 1)
Пример #19
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Clock"), parent)
        self._Global_grid = QGridLayout(self)

        self._SpeedReal_label = QLabel(_("Speed (Real)"))
        self._Global_grid.addWidget(self._SpeedReal_label, 0, 0)
        self._SpeedReal_edit = NEBox()
        self._Global_grid.addWidget(self._SpeedReal_edit, 0, 1)

        self._SpeedBIOS_label = QLabel(_("Speed (BIOS)"))
        self._Global_grid.addWidget(self._SpeedBIOS_label, 1, 0)
        self._SpeedBIOS_edit = NEBox()
        self._Global_grid.addWidget(self._SpeedBIOS_edit, 1, 1)

        self._Multiplier_label = QLabel(_("Multiplier"))
        self._Global_grid.addWidget(self._Multiplier_label, 2, 0)
        self._Multiplier_edit = NEBox()
        self._Global_grid.addWidget(self._Multiplier_edit, 2, 1)

        self._ExtClock_label = QLabel(_("Ext. Clock"))
        self._Global_grid.addWidget(self._ExtClock_label, 3, 0)
        self._ExtClock_edit = NEBox()
        self._Global_grid.addWidget(self._ExtClock_edit, 3, 1)
Пример #20
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Cache"), parent)
        self._Global_grid = QGridLayout(self)

        self._L1Data_label = QLabel(_("L1 Data"))
        self._Global_grid.addWidget(self._L1Data_label, 0, 0)
        self._L1Data_edit = NEBox()
        self._Global_grid.addWidget(self._L1Data_edit, 0, 1)

        self._L1Inst_label = QLabel(_("L1 Inst."))
        self._Global_grid.addWidget(self._L1Inst_label, 1, 0)
        self._L1Inst_edit = NEBox()
        self._Global_grid.addWidget(self._L1Inst_edit, 1, 1)

        self._L2_label = QLabel(_("Level 2"))
        self._Global_grid.addWidget(self._L2_label, 2, 0)
        self._L2_edit = NEBox()
        self._Global_grid.addWidget(self._L2_edit, 2, 1)

        self._L3_label = QLabel(_("Level 3"))
        self._Global_grid.addWidget(self._L3_label, 3, 0)
        self._L3_edit = NEBox()
        self._Global_grid.addWidget(self._L3_edit, 3, 1)
Пример #21
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Cache"), parent)
        self._Global_grid = QGridLayout(self)

        self._L1Data_label = QLabel(_("L1 Data"))
        self._Global_grid.addWidget(self._L1Data_label, 0, 0)
        self._L1Data_edit = NEBox()
        self._Global_grid.addWidget(self._L1Data_edit, 0, 1)

        self._L1Inst_label = QLabel(_("L1 Inst."))
        self._Global_grid.addWidget(self._L1Inst_label, 1, 0)
        self._L1Inst_edit = NEBox()
        self._Global_grid.addWidget(self._L1Inst_edit, 1, 1)

        self._L2_label = QLabel(_("Level 2"))
        self._Global_grid.addWidget(self._L2_label, 2, 0)
        self._L2_edit = NEBox()
        self._Global_grid.addWidget(self._L2_edit, 2, 1)

        self._L3_label = QLabel(_("Level 3"))
        self._Global_grid.addWidget(self._L3_label, 3, 0)
        self._L3_edit = NEBox()
        self._Global_grid.addWidget(self._L3_edit, 3, 1)
Пример #22
0
    def refresh_cpuinfo (self, info):
        cinfo = info.getCache()
        loop = ((self._L1Data_edit, "L1Data",),
                (self._L1Inst_edit, "L1Instruction"),
                (self._L2_edit, "L2Unified"),
                (self._L3_edit, "L3Unified"))

        for edit, name in loop:
            if name in cinfo:
                s = cinfo[name]["size"]
                if len(cinfo[name]["shared_cpu_list"]) > 1:
                    s += _(" (Processor %s shares)") % \
                                " ".join(cinfo[name]["share"])
                edit.setText(s)
            else:
                edit.setText("N/A")
Пример #23
0
    def refresh_cpuinfo(self, info):
        cinfo = info.getCache()
        loop = ((
            self._L1Data_edit,
            "L1Data",
        ), (self._L1Inst_edit, "L1Instruction"), (self._L2_edit, "L2Unified"),
                (self._L3_edit, "L3Unified"))

        for edit, name in loop:
            if name in cinfo:
                s = cinfo[name]["size"]
                if len(cinfo[name]["shared_cpu_list"]) > 1:
                    s += _(" (Processor %s shares)") % \
                                " ".join(cinfo[name]["share"])
                edit.setText(s)
            else:
                edit.setText("N/A")
Пример #24
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Device"), parent)
        self._Global_grid = QGridLayout(self)

        self._Slot_label = QLabel(_("Slot"))
        self._Global_grid.addWidget(self._Slot_label, 0, 0)
        self._Slot_combo = QComboBox()
        for i in range(meminfo.getNumOfDev()):
            self._Slot_combo.addItem(_("Slot #%d") % i)
        self.connect(self._Slot_combo, 
                    SIGNAL("currentIndexChanged(int)"),
                    self.changeSlot)
        self._Global_grid.addWidget(self._Slot_combo, 0, 1)

        self._Type_label = QLabel(_("Type"))
        self._Global_grid.addWidget(self._Type_label, 0, 4)
        self._Type_edit = NEBox()
        self._Global_grid.addWidget(self._Type_edit, 0, 5, 1, 4)

        self._Size_label = QLabel(_("Size"))
        self._Global_grid.addWidget(self._Size_label, 1, 0)
        self._Size_edit = NEBox()
        self._Global_grid.addWidget(self._Size_edit, 1, 1, 1, 8)

        self._Clock_label = QLabel(_("Clock"))
        self._Global_grid.addWidget(self._Clock_label, 2, 0)
        self._Clock_edit = NEBox()
        self._Global_grid.addWidget(self._Clock_edit, 2, 1, 1, 8)

        self._TWidth_label = QLabel(_("Total Width"))
        self._Global_grid.addWidget(self._TWidth_label, 3, 0)
        self._TWidth_edit = NEBox()
        self._Global_grid.addWidget(self._TWidth_edit, 3, 1, 1, 3)

        self._DWidth_label = QLabel(_("Data Width"))
        self._Global_grid.addWidget(self._DWidth_label, 3, 5)
        self._DWidth_edit = NEBox()
        self._Global_grid.addWidget(self._DWidth_edit, 3, 6, 1, 3)
Пример #25
0
    def __init__(self, parent=None):
        QGroupBox.__init__(self, _("Processor"), parent)
        self._Global_grid = QGridLayout(self)

        self._VendorID_label = QLabel(_("Vendor ID"))
        self._Global_grid.addWidget(self._VendorID_label, 0, 0)
        self._VendorID_edit = NEBox()
        self._Global_grid.addWidget(self._VendorID_edit, 0, 1, 1, 3)

        self._ModelName_label = QLabel(_("Model Name"))
        self._Global_grid.addWidget(self._ModelName_label, 1, 0)
        self._ModelName_edit = NEBox()
        self._Global_grid.addWidget(self._ModelName_edit, 1, 1, 1, 3)

        self._Logo_label = QLabel()
        self._Global_grid.addWidget(self._Logo_label, 0, 4, 3, 2)

        self._Slot_label = QLabel(_("Slot"))
        self._Global_grid.addWidget(self._Slot_label, 2, 0)
        self._Slot_edit = NEBox()
        self._Global_grid.addWidget(self._Slot_edit, 2, 1)

        self._OpMode_label = QLabel(_("Op-Mode"))
        self._Global_grid.addWidget(self._OpMode_label, 2, 2)
        self._OpMode_edit = NEBox()
        self._Global_grid.addWidget(self._OpMode_edit, 2, 3)

        self._Sub1_hbox = QHBoxLayout()
        self._Global_grid.addLayout(self._Sub1_hbox, 3, 0, 1, 5)

        self._Family_label = QLabel(_("Family"))
        self._Sub1_hbox.addWidget(self._Family_label)
        self._Family_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Family_edit)

        self._Model_label = QLabel(_("Model"))
        self._Sub1_hbox.addWidget(self._Model_label)
        self._Model_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Model_edit)

        self._Stepping_label = QLabel(_("Stepping"))
        self._Sub1_hbox.addWidget(self._Stepping_label)
        self._Stepping_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Stepping_edit)

        self._Sub2_hbox = QHBoxLayout()
        self._Global_grid.addLayout(self._Sub2_hbox, 4, 0, 1, 5)

        self._ExtFamily_label = QLabel(_("Ext. Family"))
        self._Sub2_hbox.addWidget(self._ExtFamily_label)
        self._ExtFamily_edit = NEBox()
        self._Sub2_hbox.addWidget(self._ExtFamily_edit)

        self._ExtModel_label = QLabel(_("Ext. Model"))
        self._Sub2_hbox.addWidget(self._ExtModel_label)
        self._ExtModel_edit = NEBox()
        self._Sub2_hbox.addWidget(self._ExtModel_edit)

        self._BogoMIPS_label = QLabel(_("BogoMIPS"))
        self._Sub2_hbox.addWidget(self._BogoMIPS_label)
        self._BogoMIPS_edit = NEBox()
        self._Sub2_hbox.addWidget(self._BogoMIPS_edit)

        self._Instruction_label = QLabel(_("Inst. Set"))
        self._Global_grid.addWidget(self._Instruction_label, 5, 0)
        self._Instruction_edit = NEBox()
        self._Global_grid.addWidget(self._Instruction_edit, 5, 1, 1, 5)
Пример #26
0
 def showAbout (self):
     QMessageBox.about(self, _("About"),
             _("<h2>%s %s</h2>"
               "An applicaton that shows information<br>"
               "about CPU and other hardwares."
              ) % (FRIENDLYNAME, VERSION))
Пример #27
0
 def showAbout(self):
     QMessageBox.about(
         self, _("About"),
         _("<h2>%s %s</h2>"
           "An applicaton that shows information<br>"
           "about CPU and other hardwares.") % (FRIENDLYNAME, VERSION))
Пример #28
0
    def __init__ (self, parent=None):
        QGroupBox.__init__(self, _("Processor"), parent)
        self._Global_grid = QGridLayout(self)

        self._VendorID_label = QLabel(_("Vendor ID"))
        self._Global_grid.addWidget(self._VendorID_label, 0, 0)
        self._VendorID_edit = NEBox()
        self._Global_grid.addWidget(self._VendorID_edit, 0, 1, 1, 3)

        self._ModelName_label = QLabel(_("Model Name"))
        self._Global_grid.addWidget(self._ModelName_label, 1, 0)
        self._ModelName_edit = NEBox()
        self._Global_grid.addWidget(self._ModelName_edit, 1, 1, 1, 3)

        self._Logo_label = QLabel()
        self._Global_grid.addWidget(self._Logo_label, 0, 4, 3, 2)

        self._Slot_label = QLabel(_("Slot"))
        self._Global_grid.addWidget(self._Slot_label, 2, 0)
        self._Slot_edit = NEBox()
        self._Global_grid.addWidget(self._Slot_edit, 2, 1)
        
        self._OpMode_label = QLabel(_("Op-Mode"))
        self._Global_grid.addWidget(self._OpMode_label, 2, 2)
        self._OpMode_edit = NEBox()
        self._Global_grid.addWidget(self._OpMode_edit, 2, 3)

        self._Sub1_hbox = QHBoxLayout()
        self._Global_grid.addLayout(self._Sub1_hbox, 3, 0, 1, 5)

        self._Family_label = QLabel(_("Family"))
        self._Sub1_hbox.addWidget(self._Family_label)
        self._Family_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Family_edit)

        self._Model_label = QLabel(_("Model"))
        self._Sub1_hbox.addWidget(self._Model_label)
        self._Model_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Model_edit)

        self._Stepping_label = QLabel(_("Stepping"))
        self._Sub1_hbox.addWidget(self._Stepping_label)
        self._Stepping_edit = NEBox()
        self._Sub1_hbox.addWidget(self._Stepping_edit)

        self._Sub2_hbox = QHBoxLayout()
        self._Global_grid.addLayout(self._Sub2_hbox, 4, 0, 1, 5)

        self._ExtFamily_label = QLabel(_("Ext. Family"))
        self._Sub2_hbox.addWidget(self._ExtFamily_label)
        self._ExtFamily_edit = NEBox()
        self._Sub2_hbox.addWidget(self._ExtFamily_edit)

        self._ExtModel_label = QLabel(_("Ext. Model"))
        self._Sub2_hbox.addWidget(self._ExtModel_label)
        self._ExtModel_edit = NEBox()
        self._Sub2_hbox.addWidget(self._ExtModel_edit)

        self._BogoMIPS_label = QLabel(_("BogoMIPS"))
        self._Sub2_hbox.addWidget(self._BogoMIPS_label)
        self._BogoMIPS_edit = NEBox()
        self._Sub2_hbox.addWidget(self._BogoMIPS_edit)

        self._Instruction_label = QLabel(_("Inst. Set"))
        self._Global_grid.addWidget(self._Instruction_label, 5, 0)
        self._Instruction_edit = NEBox()
        self._Global_grid.addWidget(self._Instruction_edit, 5, 1, 1, 5)