From: Otacilio Lacerda Date: Fri, 9 Oct 2009 13:33:50 +0000 (-0300) Subject: Last update of gforge repository X-Git-Url: http://git.maemo.org/git/?p=tablet-suite;a=commitdiff_plain;h=HEAD Last update of gforge repository --- diff --git a/src/backup/pcsbackupwizard.py b/src/backup/pcsbackupwizard.py index bd16fc5..35ed607 100644 --- a/src/backup/pcsbackupwizard.py +++ b/src/backup/pcsbackupwizard.py @@ -7,9 +7,9 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * from ui.pcsuiutils import * -from style.styleTabletSuite import * from pcsprogresswizard import * + from pcscheckboxwizard import * from pcsopenfilewizard import * from pcspcbackupmanager import * @@ -41,15 +41,17 @@ class PcsBackupWizard(QWizard): self.addPage(self.chooseFilePage) self.progressWizard = PcsProgressWizard(self.deviceInfo,self, windowManager, self) + + + self.connect(self.progressWizard.cancelButton, SIGNAL("clicked()"), - self._confirmsCancel) + self._onBackupCancel) + self.connect(self.progressWizard.doneButton, SIGNAL("clicked()"), self._done) - self.connect(self.progressWizard, SIGNAL("destroyed()"), self.test) self.addPage(self.progressWizard) - def test(self): - print "entrou caraiiiiii" - + + def noNameTest(self): if(str(self.chooseFilePage.getBackupName()).strip() == ""): message = "Your backup name can't be blank." @@ -108,19 +110,6 @@ class PcsBackupWizard(QWizard): % correct_name showMessageBox(nameChangeMessage, "Backup name changed") - def _confirmsCancel(self): - """ - Confirms the backup canceling. - """ - dialog = QMessageBox() - dialog.setText("Do you really want cancel this backup?") - dialog.setStandardButtons(QMessageBox.Yes | QMessageBox.No) - dialog.setWindowFlags(Qt.FramelessWindowHint) - dialog.setStyleSheet(MESSAGE_BOX_DEFAULT) - ret = dialog.exec_() - if ret == QMessageBox.Yes: - self._onBackupCancel() - def _onBackupCancel(self): """ Stops current backup process in backup manager. @@ -130,11 +119,6 @@ class PcsBackupWizard(QWizard): self.progressWizard.progressCanceled() self.backupManager.setBackupInProgress(False) - def setVisible (self, visible): - if(visible == False): - self.emit("") - - class UpdateBackupProgress(QThread): def __init__(self, backupName, path, hostIp, categories, comment, diff --git a/src/backup/pcscheckboxwizard.py b/src/backup/pcscheckboxwizard.py index 7745894..e3e4acc 100644 --- a/src/backup/pcscheckboxwizard.py +++ b/src/backup/pcscheckboxwizard.py @@ -289,4 +289,11 @@ class PcsCheckboxWizard(QWizardPage): buttonLayout.addWidget(self.nextButton, Qt.AlignCenter) self.vertical.addLayout(buttonLayout) self.vertical.addItem(QSpacerItem(0,10)) + + def _resetPage(self): + for key in self.map_checked.keys(): + self.map_checked[key] = False + for i in range(1,8): + item = self.grid.itemAtPosition(i, 0).widget() + item.setChecked(False) \ No newline at end of file diff --git a/src/backup/pcsrestorebackupui.py b/src/backup/pcsrestorebackupui.py index dc9733a..911b596 100644 --- a/src/backup/pcsrestorebackupui.py +++ b/src/backup/pcsrestorebackupui.py @@ -37,6 +37,8 @@ class PcsRestoreBackupUi(QDialog): self.connect (self._buttonRestoreII, SIGNAL("clicked()"), self._openRestoreBackup) self._buttonView = QPushButton("View") self.connect (self._buttonView, SIGNAL("clicked()"), self._doViewBackup) + self._buttonUpdate = QPushButton("Update") + self.connect (self._buttonUpdate, SIGNAL("clicked()"), self._doUpdateList) self.pcListView = PCSBackupListUi(self.pcBackupManager) @@ -72,12 +74,16 @@ class PcsRestoreBackupUi(QDialog): self._buttonRestoreII.setDisabled(True) self._buttonView.setStyleSheet(DEFAULT_BUTTON_STYLE) self._buttonView.setDisabled(True) + self._buttonUpdate.setStyleSheet(DEFAULT_BUTTON_STYLE) + self._buttonUpdate.setDisabled(True) + if pcFlag: - buttonBox.addWidget(self._buttonView) buttonBox.addWidget(self._buttonRestoreI) + buttonBox.addWidget(self._buttonView) else: buttonBox.addWidget(self._buttonRestoreII) + buttonBox.addWidget(self._buttonUpdate) return buttonBox @@ -226,6 +232,7 @@ class PcsRestoreBackupUi(QDialog): selectionModel = list.selectionModel() indexList = selectionModel.selectedRows() + self._buttonUpdate.setEnabled(True) if len(indexList) <> 1: self._buttonView.setDisabled(True) self._buttonRestoreI.setDisabled(True) @@ -240,7 +247,10 @@ class PcsRestoreBackupUi(QDialog): return self.pcListView else: return self.deviceListView - + + def _doUpdateList(self): + self._currentBackupList().updateBackupList() + self._updateButtonsState(0) def doRestoreBackup(self, categories): if self._currentBackupList() == self.pcListView: diff --git a/src/style/styleTabletSuite.py b/src/style/styleTabletSuite.py index 493cdd5..80d2e22 100644 --- a/src/style/styleTabletSuite.py +++ b/src/style/styleTabletSuite.py @@ -259,12 +259,6 @@ STYLESHEET = ''' max-width: 370px; } - QTabWidget#tabBar::pane { - border-top: 10px solid transparent; - border-left: 40px solid transparent; - background-color: transparent; - } - QTableView#ListView { border-image: url(''' + TABLE_BORDER + '''); background-color: transparent; @@ -318,6 +312,34 @@ STYLESHEET = ''' font: 10px; } + QTabWidget#tabBar::pane { + border-top: 10px solid transparent; + border-left: 40px solid transparent; + background-color: transparent; + } + + QTabBar{ + background:transparent; + margin: 0px; + border: none; + } + + QTabBar::tab { + background: red; + border: 2px solid red; + border-bottom-color: red; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + min-width: 8ex; + padding: 2px; + } + + QTabBar::tab:selected { + border-color: red; + border-bottom-color: red; + } + + QTabBar#restoreTabs { qproperty-focusPolicy: NoFocus; } @@ -334,6 +356,10 @@ STYLESHEET = ''' QTabBar#restoreTabs::tab:selected { color: white; } + + QTabBar#restoreTabs::tab:!selected { + color: black; + } QTabBar#managerTabs { qproperty-focusPolicy: NoFocus;