10 from PyQt4.QtCore import QObject |
10 from PyQt4.QtCore import QObject |
11 |
11 |
12 |
12 |
13 class HgExtensionProjectHelper(QObject): |
13 class HgExtensionProjectHelper(QObject): |
14 """ |
14 """ |
15 Class implementing the project helper base for Mercurial extension interfaces. |
15 Class implementing the project helper base for Mercurial extension |
|
16 interfaces. |
16 |
17 |
17 Note: The methods initActions(), initMenu(mainMenu) and menuTitle() have to be |
18 Note: The methods initActions(), initMenu(mainMenu) and menuTitle() have |
18 reimplemented by derived classes. |
19 to be reimplemented by derived classes. |
19 """ |
20 """ |
20 def __init__(self): |
21 def __init__(self): |
21 """ |
22 """ |
22 Constructor |
23 Constructor |
23 """ |
24 """ |
49 """ |
50 """ |
50 Public method to generate the action objects. |
51 Public method to generate the action objects. |
51 |
52 |
52 Note: Derived class must implement this method. |
53 Note: Derived class must implement this method. |
53 |
54 |
54 @exception NotImplementedError raised if the class has not been reimplemente |
55 @exception NotImplementedError raised if the class has not been |
|
56 reimplemente |
55 """ |
57 """ |
56 raise NotImplementedError |
58 raise NotImplementedError |
57 |
59 |
58 def initMenu(self, mainMenu): |
60 def initMenu(self, mainMenu): |
59 """ |
61 """ |
61 |
63 |
62 Note: Derived class must implement this method. |
64 Note: Derived class must implement this method. |
63 |
65 |
64 @param mainMenu reference to the main menu (QMenu) |
66 @param mainMenu reference to the main menu (QMenu) |
65 @ireturn populated menu (QMenu) |
67 @ireturn populated menu (QMenu) |
66 @exception NotImplementedError raised if the class has not been reimplemente |
68 @exception NotImplementedError raised if the class has not been |
|
69 reimplemente |
67 """ |
70 """ |
68 raise NotImplementedError |
71 raise NotImplementedError |
69 |
72 |
70 def menuTitle(self): |
73 def menuTitle(self): |
71 """ |
74 """ |
72 Public method to get the menu title. |
75 Public method to get the menu title. |
73 |
76 |
74 Note: Derived class must implement this method. |
77 Note: Derived class must implement this method. |
75 |
78 |
76 @ireturn title of the menu (string) |
79 @ireturn title of the menu (string) |
77 @exception NotImplementedError raised if the class has not been reimplemente |
80 @exception NotImplementedError raised if the class has not been |
|
81 reimplemente |
78 """ |
82 """ |
79 raise NotImplementedError |
83 raise NotImplementedError |