994 |
994 |
995 formsSources = [] |
995 formsSources = [] |
996 try: |
996 try: |
997 forms = self.__project.getProjectFiles("FORMS") |
997 forms = self.__project.getProjectFiles("FORMS") |
998 except AttributeError: |
998 except AttributeError: |
|
999 # backward compatibility < 16.12 |
999 forms = self.__project.pdata["FORMS"] |
1000 forms = self.__project.pdata["FORMS"] |
1000 for fn in forms: |
1001 for fn in forms: |
1001 ofn = os.path.splitext(fn)[0] |
1002 ofn = os.path.splitext(fn)[0] |
1002 dirname, filename = os.path.split(ofn) |
1003 dirname, filename = os.path.split(ofn) |
1003 formSource = os.path.join(dirname, "Ui_" + filename + sourceExt) |
1004 formSource = os.path.join(dirname, "Ui_" + filename + sourceExt) |
1225 @rtype list of str |
1226 @rtype list of str |
1226 """ |
1227 """ |
1227 try: |
1228 try: |
1228 return QScintilla.Lexers.getSupportedApiLanguages() |
1229 return QScintilla.Lexers.getSupportedApiLanguages() |
1229 except AttributeError: |
1230 except AttributeError: |
|
1231 # backward compatibility < 16.12 |
1230 return [lang for lang in |
1232 return [lang for lang in |
1231 QScintilla.Lexers.getSupportedLanguages().keys() |
1233 QScintilla.Lexers.getSupportedLanguages().keys() |
1232 if lang != "Guessed" and not lang.startswith("Pygments|")] |
1234 if lang != "Guessed" and not lang.startswith("Pygments|")] |
1233 |
1235 |
1234 def deactivate(self): |
1236 def deactivate(self): |
1246 |
1248 |
1247 @param msg message to be shown (string) |
1249 @param msg message to be shown (string) |
1248 """ |
1250 """ |
1249 if msg: |
1251 if msg: |
1250 self.__mw.statusBar().showMessage(msg, 2000) |
1252 self.__mw.statusBar().showMessage(msg, 2000) |
1251 |
|
1252 def __apiPreparationFinished(self, language): |
|
1253 """ |
|
1254 Private slot handling the preparation finished signal of an API object. |
|
1255 |
|
1256 @param language language of the API (string) |
|
1257 """ |
|
1258 if language == ApisNameProject: |
|
1259 language = self.tr("Project") |
|
1260 self.__showMessage(self.tr("Preparation of '{0}' APIs finished.") |
|
1261 .format(language)) |
|
1262 |
|
1263 def __apiPreparationStarted(self, language): |
|
1264 """ |
|
1265 Private slot handling the preparation started signal of an API object. |
|
1266 |
|
1267 @param language language of the API (string) |
|
1268 """ |
|
1269 if language == ApisNameProject: |
|
1270 language = self.tr("Project") |
|
1271 self.__showMessage(self.tr("Preparation of '{0}' APIs started.") |
|
1272 .format(language)) |
|
1273 |
|
1274 def __apiPreparationCancelled(self, language): |
|
1275 """ |
|
1276 Private slot handling the preparation cancelled signal of an API |
|
1277 object. |
|
1278 |
|
1279 @param language language of the API (string) |
|
1280 """ |
|
1281 if language == ApisNameProject: |
|
1282 language = self.tr("Project") |
|
1283 self.__showMessage(self.tr("Preparation of '{0}' APIs cancelled.") |
|
1284 .format(language)) |
|
1285 |
1253 |
1286 def __apiPreparationStatus(self, language, status, filename): |
1254 def __apiPreparationStatus(self, language, status, filename): |
1287 """ |
1255 """ |
1288 Private slot handling the preparation status signal of an API object. |
1256 Private slot handling the preparation status signal of an API object. |
1289 |
1257 |