2953:703452a2876f | 2954:bf0215fe12d1 |
---|---|
2 | 2 |
3 # Copyright (c) 2012 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> | 3 # Copyright (c) 2012 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # | 4 # |
5 | 5 |
6 """ | 6 """ |
7 Module implementing a dialog to select the action to be performed on the bookmark. | 7 Module implementing a dialog to select the action to be performed on the |
8 bookmark. | |
8 """ | 9 """ |
9 | 10 |
10 from PyQt4.QtCore import pyqtSlot | 11 from PyQt4.QtCore import pyqtSlot |
11 from PyQt4.QtGui import QDialog | 12 from PyQt4.QtGui import QDialog |
12 | 13 |
15 import UI.PixmapCache | 16 import UI.PixmapCache |
16 | 17 |
17 | 18 |
18 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): | 19 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): |
19 """ | 20 """ |
20 Class implementing a dialog to select the action to be performed on the bookmark. | 21 Class implementing a dialog to select the action to be performed on |
22 the bookmark. | |
21 """ | 23 """ |
22 Undefined = -1 | 24 Undefined = -1 |
23 AddBookmark = 0 | 25 AddBookmark = 0 |
24 EditBookmark = 1 | 26 EditBookmark = 1 |
25 AddSpeeddial = 2 | 27 AddSpeeddial = 2 |
49 self.__bmAction = self.EditBookmark | 51 self.__bmAction = self.EditBookmark |
50 self.bookmarkPushButton.setText(self.trUtf8("Edit Bookmark")) | 52 self.bookmarkPushButton.setText(self.trUtf8("Edit Bookmark")) |
51 | 53 |
52 if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url: | 54 if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url: |
53 self.__sdAction = self.RemoveSpeeddial | 55 self.__sdAction = self.RemoveSpeeddial |
54 self.speeddialPushButton.setText(self.trUtf8("Remove from Speed Dial")) | 56 self.speeddialPushButton.setText( |
57 self.trUtf8("Remove from Speed Dial")) | |
55 else: | 58 else: |
56 self.__sdAction = self.AddSpeeddial | 59 self.__sdAction = self.AddSpeeddial |
57 self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial")) | 60 self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial")) |
58 | 61 |
59 @pyqtSlot() | 62 @pyqtSlot() |
73 self.accept() | 76 self.accept() |
74 | 77 |
75 def getAction(self): | 78 def getAction(self): |
76 """ | 79 """ |
77 Public method to get the selected action. | 80 Public method to get the selected action. |
81 | |
82 @return reference to the associated action | |
78 """ | 83 """ |
79 return self.__action | 84 return self.__action |