# Authors: Amaury Medeiros and Paulo Ouriques # Software License: GPL import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from ui.pcsmenu import * from ui.pcsapplicationlist import * from ui.pcsdeviceviewer import * from ui.pcsuiutils import * from pcsdevicemanager import PcsDeviceManager from ui.pcscustombuttons import PcsCustomButton as customButton from ui.pcsbutton import PcsButton from style.styleTabletSuite import * class PCSuite(QMainWindow): ''' Class that creates the main window of Pc Suite. ''' def __init__(self): QMainWindow.__init__(self) self.setWindowIcon(QIcon(TABLET_SUITE_LOGO)) self.setWindowTitle(APPLICATION_NAME) self.setFixedSize(WINDOW_WIDTH, WINDOW_HEIGHT) self.deviceManager = PcsDeviceManager() self.menuBar = PcsMenu(self.deviceManager, self) # self.menuBar.setVisible(False) self.setMenuBar(self.menuBar) self.topPanel = PcsApplicationList(self.deviceManager) self.bottomPanel = PcsDeviceViewer(self.deviceManager, self) layout = QVBoxLayout() spacer = QSpacerItem(0, 70) layout.addItem(spacer) layout.addWidget(self.topPanel) layout.addWidget(self.bottomPanel) layout.setMargin(0) layout.setSpacing(0) centralize(self) centralPanel = QFrame() centralPanel.setLayout(layout) self.setCentralWidget(centralPanel) self.connectLabel = PcsButton("connect", self) self.connectLabel.setObjectName("tsButton") self.connectLabel.setGeometry(QRect(14, 365, 94, 35)) self.connect(self.connectLabel, SIGNAL("clicked()"), self.bottomPanel.showConnectDialog) self.backButton = customButton(BACK_BUTTON, BACK_BUTTON_CLICKED, self) self.backButton.setGeometry(QRect(411, 39, 15, 15)) self.connect(self.backButton, SIGNAL("clicked()"), self.back) self.forwardButton = customButton(FORWARD_BUTTON, FORWARD_BUTTON_CLICKED, self) self.forwardButton.setGeometry(QRect(430, 39, 15, 15)) self.connect(self.forwardButton, SIGNAL("clicked()"), self.forward) self.setStyleSheet(STYLESHEET) def back(self): print "back" def forward(self): print "forward"