14 |
14 |
15 import editorconfig |
15 import editorconfig |
16 |
16 |
17 from PyQt5.QtCore import ( |
17 from PyQt5.QtCore import ( |
18 pyqtSignal, pyqtSlot, Qt, QDir, QTimer, QModelIndex, QFileInfo, |
18 pyqtSignal, pyqtSlot, Qt, QDir, QTimer, QModelIndex, QFileInfo, |
19 QCryptographicHash, QEvent, QDateTime, QPoint |
19 QCryptographicHash, QEvent, QDateTime, QPoint, QSize |
20 ) |
20 ) |
21 from PyQt5.QtGui import QPalette, QFont, QPixmap, QPainter |
21 from PyQt5.QtGui import QPalette, QFont, QPixmap, QPainter |
22 from PyQt5.QtWidgets import ( |
22 from PyQt5.QtWidgets import ( |
23 QLineEdit, QActionGroup, QDialog, QInputDialog, QApplication, QMenu |
23 QLineEdit, QActionGroup, QDialog, QInputDialog, QApplication, QMenu |
24 ) |
24 ) |
583 |
583 |
584 def __registerImages(self): |
584 def __registerImages(self): |
585 """ |
585 """ |
586 Private method to register images for autocompletion lists. |
586 Private method to register images for autocompletion lists. |
587 """ |
587 """ |
588 self.registerImage(self.ClassID, |
588 # finale size of the completion images |
589 UI.PixmapCache.getPixmap("class")) |
589 imageSize = QSize(16, 16) |
590 self.registerImage(self.ClassProtectedID, |
590 |
591 UI.PixmapCache.getPixmap("class_protected")) |
591 self.registerImage( |
592 self.registerImage(self.ClassPrivateID, |
592 self.ClassID, |
593 UI.PixmapCache.getPixmap("class_private")) |
593 UI.PixmapCache.getPixmap("class", imageSize)) |
594 self.registerImage(self.MethodID, |
594 self.registerImage( |
595 UI.PixmapCache.getPixmap("method")) |
595 self.ClassProtectedID, |
596 self.registerImage(self.MethodProtectedID, |
596 UI.PixmapCache.getPixmap("class_protected", imageSize)) |
597 UI.PixmapCache.getPixmap("method_protected")) |
597 self.registerImage( |
598 self.registerImage(self.MethodPrivateID, |
598 self.ClassPrivateID, |
599 UI.PixmapCache.getPixmap("method_private")) |
599 UI.PixmapCache.getPixmap("class_private", imageSize)) |
600 self.registerImage(self.AttributeID, |
600 self.registerImage( |
601 UI.PixmapCache.getPixmap("attribute")) |
601 self.MethodID, |
602 self.registerImage(self.AttributeProtectedID, |
602 UI.PixmapCache.getPixmap("method", imageSize)) |
603 UI.PixmapCache.getPixmap("attribute_protected")) |
603 self.registerImage( |
604 self.registerImage(self.AttributePrivateID, |
604 self.MethodProtectedID, |
605 UI.PixmapCache.getPixmap("attribute_private")) |
605 UI.PixmapCache.getPixmap("method_protected", imageSize)) |
606 self.registerImage(self.EnumID, |
606 self.registerImage( |
607 UI.PixmapCache.getPixmap("enum")) |
607 self.MethodPrivateID, |
608 self.registerImage(self.KeywordsID, |
608 UI.PixmapCache.getPixmap("method_private", imageSize)) |
609 UI.PixmapCache.getPixmap("keywords")) |
609 self.registerImage( |
610 self.registerImage(self.ModuleID, |
610 self.AttributeID, |
611 UI.PixmapCache.getPixmap("module")) |
611 UI.PixmapCache.getPixmap("attribute", imageSize)) |
612 |
612 self.registerImage( |
613 self.registerImage(self.FromDocumentID, |
613 self.AttributeProtectedID, |
614 UI.PixmapCache.getPixmap("editor")) |
614 UI.PixmapCache.getPixmap("attribute_protected", imageSize)) |
615 |
615 self.registerImage( |
616 self.registerImage(self.TemplateImageID, |
616 self.AttributePrivateID, |
617 UI.PixmapCache.getPixmap("templateViewer")) |
617 UI.PixmapCache.getPixmap("attribute_private", imageSize)) |
|
618 self.registerImage( |
|
619 self.EnumID, |
|
620 UI.PixmapCache.getPixmap("enum", imageSize)) |
|
621 self.registerImage( |
|
622 self.KeywordsID, |
|
623 UI.PixmapCache.getPixmap("keywords", imageSize)) |
|
624 self.registerImage( |
|
625 self.ModuleID, |
|
626 UI.PixmapCache.getPixmap("module", imageSize)) |
|
627 |
|
628 self.registerImage( |
|
629 self.FromDocumentID, |
|
630 UI.PixmapCache.getPixmap("editor", imageSize)) |
|
631 |
|
632 self.registerImage( |
|
633 self.TemplateImageID, |
|
634 UI.PixmapCache.getPixmap("templateViewer", imageSize)) |
618 |
635 |
619 def addClone(self, editor): |
636 def addClone(self, editor): |
620 """ |
637 """ |
621 Public method to add a clone to our list. |
638 Public method to add a clone to our list. |
622 |
639 |