├── .gitignore ├── LICENSE ├── README.md ├── actions.py ├── icons ├── Icon.ico ├── Screenshot1.png ├── Screenshot2.png ├── arrow-left-alt1.png ├── arrow-left.png ├── arrow-right-alt1.png ├── arrow-right.png ├── box-add.png ├── box-remove.png ├── cog.png ├── comment-alt2-stroke.png ├── comment-stroke.png ├── download.png ├── enlarge2.png ├── file-text2.png ├── fit.png ├── floppy-disk.png ├── floppy.png ├── folder-open.png ├── folder.png ├── fullscreen-exit.png ├── images.png ├── line.png ├── loop2.png ├── move.png ├── rectangle.png ├── redo2.png ├── reload.png ├── spinner11.png ├── undo2.png ├── upload.png ├── zoom-in.png ├── zoom-out.png ├── zoom_minus.png └── zoom_plus.png ├── main.py └── main.ui /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 ap193uee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PyQt-Image-Viewer 2 | Basic image viewer using pyqt to show an image with zoom and pan functionalities. 3 | 4 | Current Functionalities: 5 | * Zoom In and Out 6 | * Image Pan 7 | 8 | To be added: 9 | * Draw line and rectangle 10 | * Overlay Text 11 | * Save image 12 | * Undo and Redo changes 13 | 14 | Files: 15 | * *actions.py*: contains ImageViewer class 16 | * *main.py*: contains implementation of ImageViewer class to show its functionalities and use cases 17 | 18 | ![Screenshot_1](/icons/Screenshot1.png?raw=true "App Screenshot") 19 | -------------------------------------------------------------------------------- /actions.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtGui import QImage, QPixmap, QPainter 2 | from PyQt5 import QtCore, QtGui, QtWidgets 3 | 4 | 5 | __author__ = "Atinderpal Singh" 6 | __license__ = "MIT" 7 | __version__ = "1.0" 8 | __email__ = "atinderpalap@gmail.com" 9 | 10 | class ImageViewer: 11 | ''' Basic image viewer class to show an image with zoom and pan functionaities. 12 | Requirement: Qt's Qlabel widget name where the image will be drawn/displayed. 13 | ''' 14 | def __init__(self, qlabel): 15 | self.qlabel_image = qlabel # widget/window name where image is displayed (I'm usiing qlabel) 16 | self.qimage_scaled = QImage() # scaled image to fit to the size of qlabel_image 17 | self.qpixmap = QPixmap() # qpixmap to fill the qlabel_image 18 | 19 | self.zoomX = 1 # zoom factor w.r.t size of qlabel_image 20 | self.position = [0, 0] # position of top left corner of qimage_label w.r.t. qimage_scaled 21 | self.panFlag = False # to enable or disable pan 22 | 23 | self.qlabel_image.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored) 24 | self.__connectEvents() 25 | 26 | def __connectEvents(self): 27 | # Mouse events 28 | self.qlabel_image.mousePressEvent = self.mousePressAction 29 | self.qlabel_image.mouseMoveEvent = self.mouseMoveAction 30 | self.qlabel_image.mouseReleaseEvent = self.mouseReleaseAction 31 | 32 | def onResize(self): 33 | ''' things to do when qlabel_image is resized ''' 34 | self.qpixmap = QPixmap(self.qlabel_image.size()) 35 | self.qpixmap.fill(QtCore.Qt.gray) 36 | self.qimage_scaled = self.qimage.scaled(self.qlabel_image.width() * self.zoomX, self.qlabel_image.height() * self.zoomX, QtCore.Qt.KeepAspectRatio) 37 | self.update() 38 | 39 | def loadImage(self, imagePath): 40 | ''' To load and display new image.''' 41 | self.qimage = QImage(imagePath) 42 | self.qpixmap = QPixmap(self.qlabel_image.size()) 43 | if not self.qimage.isNull(): 44 | # reset Zoom factor and Pan position 45 | self.zoomX = 1 46 | self.position = [0, 0] 47 | self.qimage_scaled = self.qimage.scaled(self.qlabel_image.width(), self.qlabel_image.height(), QtCore.Qt.KeepAspectRatio) 48 | self.update() 49 | else: 50 | self.statusbar.showMessage('Cannot open this image! Try another one.', 5000) 51 | 52 | def update(self): 53 | ''' This function actually draws the scaled image to the qlabel_image. 54 | It will be repeatedly called when zooming or panning. 55 | So, I tried to include only the necessary operations required just for these tasks. 56 | ''' 57 | if not self.qimage_scaled.isNull(): 58 | # check if position is within limits to prevent unbounded panning. 59 | px, py = self.position 60 | px = px if (px <= self.qimage_scaled.width() - self.qlabel_image.width()) else (self.qimage_scaled.width() - self.qlabel_image.width()) 61 | py = py if (py <= self.qimage_scaled.height() - self.qlabel_image.height()) else (self.qimage_scaled.height() - self.qlabel_image.height()) 62 | px = px if (px >= 0) else 0 63 | py = py if (py >= 0) else 0 64 | self.position = (px, py) 65 | 66 | if self.zoomX == 1: 67 | self.qpixmap.fill(QtCore.Qt.white) 68 | 69 | # the act of painting the qpixamp 70 | painter = QPainter() 71 | painter.begin(self.qpixmap) 72 | painter.drawImage(QtCore.QPoint(0, 0), self.qimage_scaled, 73 | QtCore.QRect(self.position[0], self.position[1], self.qlabel_image.width(), self.qlabel_image.height()) ) 74 | painter.end() 75 | 76 | self.qlabel_image.setPixmap(self.qpixmap) 77 | else: 78 | pass 79 | 80 | def mousePressAction(self, QMouseEvent): 81 | x, y = QMouseEvent.pos().x(), QMouseEvent.pos().y() 82 | #print(x,y) 83 | if self.panFlag: 84 | self.pressed = QMouseEvent.pos() # starting point of drag vector 85 | self.anchor = self.position # save the pan position when panning starts 86 | 87 | def mouseMoveAction(self, QMouseEvent): 88 | x, y = QMouseEvent.pos().x(), QMouseEvent.pos().y() 89 | if self.pressed: 90 | dx, dy = x - self.pressed.x(), y - self.pressed.y() # calculate the drag vector 91 | self.position = self.anchor[0] - dx, self.anchor[1] - dy # update pan position using drag vector 92 | self.update() # show the image with udated pan position 93 | 94 | def mouseReleaseAction(self, QMouseEvent): 95 | self.pressed = None # clear the starting point of drag vector 96 | 97 | def zoomPlus(self): 98 | self.zoomX += 1 99 | px, py = self.position 100 | px += self.qlabel_image.width()/2 101 | py += self.qlabel_image.height()/2 102 | self.position = (px, py) 103 | self.qimage_scaled = self.qimage.scaled(self.qlabel_image.width() * self.zoomX, self.qlabel_image.height() * self.zoomX, QtCore.Qt.KeepAspectRatio) 104 | self.update() 105 | 106 | def zoomMinus(self): 107 | if self.zoomX > 1: 108 | self.zoomX -= 1 109 | px, py = self.position 110 | px -= self.qlabel_image.width()/2 111 | py -= self.qlabel_image.height()/2 112 | self.position = (px, py) 113 | self.qimage_scaled = self.qimage.scaled(self.qlabel_image.width() * self.zoomX, self.qlabel_image.height() * self.zoomX, QtCore.Qt.KeepAspectRatio) 114 | self.update() 115 | 116 | def resetZoom(self): 117 | self.zoomX = 1 118 | self.position = [0, 0] 119 | self.qimage_scaled = self.qimage.scaled(self.qlabel_image.width() * self.zoomX, self.qlabel_image.height() * self.zoomX, QtCore.Qt.KeepAspectRatio) 120 | self.update() 121 | 122 | def enablePan(self, value): 123 | self.panFlag = value 124 | 125 | -------------------------------------------------------------------------------- /icons/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/Icon.ico -------------------------------------------------------------------------------- /icons/Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/Screenshot1.png -------------------------------------------------------------------------------- /icons/Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/Screenshot2.png -------------------------------------------------------------------------------- /icons/arrow-left-alt1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/arrow-left-alt1.png -------------------------------------------------------------------------------- /icons/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/arrow-left.png -------------------------------------------------------------------------------- /icons/arrow-right-alt1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/arrow-right-alt1.png -------------------------------------------------------------------------------- /icons/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/arrow-right.png -------------------------------------------------------------------------------- /icons/box-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/box-add.png -------------------------------------------------------------------------------- /icons/box-remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/box-remove.png -------------------------------------------------------------------------------- /icons/cog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/cog.png -------------------------------------------------------------------------------- /icons/comment-alt2-stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/comment-alt2-stroke.png -------------------------------------------------------------------------------- /icons/comment-stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/comment-stroke.png -------------------------------------------------------------------------------- /icons/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/download.png -------------------------------------------------------------------------------- /icons/enlarge2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/enlarge2.png -------------------------------------------------------------------------------- /icons/file-text2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/file-text2.png -------------------------------------------------------------------------------- /icons/fit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/fit.png -------------------------------------------------------------------------------- /icons/floppy-disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/floppy-disk.png -------------------------------------------------------------------------------- /icons/floppy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/floppy.png -------------------------------------------------------------------------------- /icons/folder-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/folder-open.png -------------------------------------------------------------------------------- /icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/folder.png -------------------------------------------------------------------------------- /icons/fullscreen-exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/fullscreen-exit.png -------------------------------------------------------------------------------- /icons/images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/images.png -------------------------------------------------------------------------------- /icons/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/line.png -------------------------------------------------------------------------------- /icons/loop2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/loop2.png -------------------------------------------------------------------------------- /icons/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/move.png -------------------------------------------------------------------------------- /icons/rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/rectangle.png -------------------------------------------------------------------------------- /icons/redo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/redo2.png -------------------------------------------------------------------------------- /icons/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/reload.png -------------------------------------------------------------------------------- /icons/spinner11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/spinner11.png -------------------------------------------------------------------------------- /icons/undo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/undo2.png -------------------------------------------------------------------------------- /icons/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/upload.png -------------------------------------------------------------------------------- /icons/zoom-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/zoom-in.png -------------------------------------------------------------------------------- /icons/zoom-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/zoom-out.png -------------------------------------------------------------------------------- /icons/zoom_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/zoom_minus.png -------------------------------------------------------------------------------- /icons/zoom_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ap193uee/PyQt-Image-Viewer/fd0540e84abcfa44983ac390acddca7ada94612f/icons/zoom_plus.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | ''' A basic GUi to use ImageViewer class to show its functionalities and use cases. ''' 4 | 5 | from PyQt5 import QtCore, QtWidgets, uic, QtWidgets 6 | from actions import ImageViewer 7 | import sys, os 8 | 9 | gui = uic.loadUiType("main.ui")[0] # load UI file designed in Qt Designer 10 | VALID_FORMAT = ('.BMP', '.GIF', '.JPG', '.JPEG', '.PNG', '.PBM', '.PGM', '.PPM', '.TIFF', '.XBM') # Image formats supported by Qt 11 | 12 | def getImages(folder): 13 | ''' Get the names and paths of all the images in a directory. ''' 14 | image_list = [] 15 | if os.path.isdir(folder): 16 | for file in os.listdir(folder): 17 | if file.upper().endswith(VALID_FORMAT): 18 | im_path = os.path.join(folder, file) 19 | image_obj = {'name': file, 'path': im_path } 20 | image_list.append(image_obj) 21 | return image_list 22 | 23 | class Iwindow(QtWidgets.QMainWindow, gui): 24 | def __init__(self, parent=None): 25 | QtWidgets.QMainWindow.__init__(self, parent) 26 | self.setupUi(self) 27 | 28 | self.cntr, self.numImages = -1, -1 # self.cntr have the info of which image is selected/displayed 29 | 30 | self.image_viewer = ImageViewer(self.qlabel_image) 31 | self.__connectEvents() 32 | self.showMaximized() 33 | 34 | def __connectEvents(self): 35 | self.open_folder.clicked.connect(self.selectDir) 36 | self.next_im.clicked.connect(self.nextImg) 37 | self.prev_im.clicked.connect(self.prevImg) 38 | self.qlist_images.itemClicked.connect(self.item_click) 39 | # self.save_im.clicked.connect(self.saveImg) 40 | 41 | self.zoom_plus.clicked.connect(self.image_viewer.zoomPlus) 42 | self.zoom_minus.clicked.connect(self.image_viewer.zoomMinus) 43 | self.reset_zoom.clicked.connect(self.image_viewer.resetZoom) 44 | 45 | self.toggle_line.toggled.connect(self.action_line) 46 | self.toggle_rect.toggled.connect(self.action_rect) 47 | self.toggle_move.toggled.connect(self.action_move) 48 | 49 | def selectDir(self): 50 | ''' Select a directory, make list of images in it and display the first image in the list. ''' 51 | # open 'select folder' dialog box 52 | self.folder = str(QtWidgets.QFileDialog.getExistingDirectory(self, "Select Directory")) 53 | if not self.folder: 54 | QtWidgets.QMessageBox.warning(self, 'No Folder Selected', 'Please select a valid Folder') 55 | return 56 | 57 | self.logs = getImages(self.folder) 58 | self.numImages = len(self.logs) 59 | 60 | # make qitems of the image names 61 | self.items = [QtWidgets.QListWidgetItem(log['name']) for log in self.logs] 62 | for item in self.items: 63 | self.qlist_images.addItem(item) 64 | 65 | # display first image and enable Pan 66 | self.cntr = 0 67 | self.image_viewer.enablePan(True) 68 | self.image_viewer.loadImage(self.logs[self.cntr]['path']) 69 | self.items[self.cntr].setSelected(True) 70 | #self.qlist_images.setItemSelected(self.items[self.cntr], True) 71 | 72 | # enable the next image button on the gui if multiple images are loaded 73 | if self.numImages > 1: 74 | self.next_im.setEnabled(True) 75 | 76 | def resizeEvent(self, evt): 77 | if self.cntr >= 0: 78 | self.image_viewer.onResize() 79 | 80 | def nextImg(self): 81 | if self.cntr < self.numImages -1: 82 | self.cntr += 1 83 | self.image_viewer.loadImage(self.logs[self.cntr]['path']) 84 | self.items[self.cntr].setSelected(True) 85 | #self.qlist_images.setItemSelected(self.items[self.cntr], True) 86 | else: 87 | QtWidgets.QMessageBox.warning(self, 'Sorry', 'No more Images!') 88 | 89 | def prevImg(self): 90 | if self.cntr > 0: 91 | self.cntr -= 1 92 | self.image_viewer.loadImage(self.logs[self.cntr]['path']) 93 | self.items[self.cntr].setSelected(True) 94 | #self.qlist_images.setItemSelected(self.items[self.cntr], True) 95 | else: 96 | QtWidgets.QMessageBox.warning(self, 'Sorry', 'No previous Image!') 97 | 98 | def item_click(self, item): 99 | self.cntr = self.items.index(item) 100 | self.image_viewer.loadImage(self.logs[self.cntr]['path']) 101 | 102 | def action_line(self): 103 | if self.toggle_line.isChecked(): 104 | self.qlabel_image.setCursor(QtCore.Qt.CrossCursor) 105 | self.image_viewer.enablePan(False) 106 | 107 | def action_rect(self): 108 | if self.toggle_rect.isChecked(): 109 | self.qlabel_image.setCursor(QtCore.Qt.CrossCursor) 110 | self.image_viewer.enablePan(False) 111 | 112 | def action_move(self): 113 | if self.toggle_move.isChecked(): 114 | self.qlabel_image.setCursor(QtCore.Qt.OpenHandCursor) 115 | self.image_viewer.enablePan(True) 116 | 117 | def main(): 118 | app = QtWidgets.QApplication(sys.argv) 119 | app.setStyle(QtWidgets.QStyleFactory.create("Cleanlooks")) 120 | app.setPalette(QtWidgets.QApplication.style().standardPalette()) 121 | parentWindow = Iwindow(None) 122 | sys.exit(app.exec_()) 123 | 124 | if __name__ == "__main__": 125 | #print __doc__ 126 | main() -------------------------------------------------------------------------------- /main.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Image Viewer 15 | 16 | 17 | 18 | icons/Icon.icoicons/Icon.ico 19 | 20 | 21 | background-color: rgb(255, 255, 255); 22 | 23 | 24 | 25 | 26 | 27 | 28 | 12 29 | 30 | 31 | QLayout::SetMaximumSize 32 | 33 | 34 | 35 | 36 | 6 37 | 38 | 39 | 40 | 41 | QFrame::Plain 42 | 43 | 44 | Qt::Horizontal 45 | 46 | 47 | 48 | 49 | 50 | 51 | 2 52 | 53 | 54 | 55 | 56 | PointingHandCursor 57 | 58 | 59 | Mark line 60 | 61 | 62 | 63 | 64 | 65 | ... 66 | 67 | 68 | 69 | icons/line.pngicons/line.png 70 | 71 | 72 | 73 | 20 74 | 20 75 | 76 | 77 | 78 | true 79 | 80 | 81 | buttonGroup 82 | 83 | 84 | 85 | 86 | 87 | 88 | PointingHandCursor 89 | 90 | 91 | Mark rectangular surface 92 | 93 | 94 | ... 95 | 96 | 97 | 98 | icons/rectangle.pngicons/rectangle.png 99 | 100 | 101 | 102 | 20 103 | 20 104 | 105 | 106 | 107 | true 108 | 109 | 110 | buttonGroup 111 | 112 | 113 | 114 | 115 | 116 | 117 | PointingHandCursor 118 | 119 | 120 | Move Image 121 | 122 | 123 | false 124 | 125 | 126 | 127 | 128 | 129 | ... 130 | 131 | 132 | 133 | icons/move.pngicons/move.png 134 | 135 | 136 | 137 | 20 138 | 20 139 | 140 | 141 | 142 | true 143 | 144 | 145 | true 146 | 147 | 148 | Qt::ToolButtonIconOnly 149 | 150 | 151 | false 152 | 153 | 154 | buttonGroup 155 | 156 | 157 | 158 | 159 | 160 | 161 | QFrame::Plain 162 | 163 | 164 | Qt::Vertical 165 | 166 | 167 | 168 | 169 | 170 | 171 | PointingHandCursor 172 | 173 | 174 | Save Image 175 | 176 | 177 | ... 178 | 179 | 180 | 181 | icons/download.pngicons/download.png 182 | 183 | 184 | 185 | 20 186 | 20 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | PointingHandCursor 195 | 196 | 197 | Load Previous Image 198 | 199 | 200 | ... 201 | 202 | 203 | 204 | icons/arrow-left.pngicons/arrow-left.png 205 | 206 | 207 | 208 | 20 209 | 20 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | PointingHandCursor 218 | 219 | 220 | Load Next Image 221 | 222 | 223 | ... 224 | 225 | 226 | 227 | icons/arrow-right.pngicons/arrow-right.png 228 | 229 | 230 | 231 | 20 232 | 20 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | QFrame::Plain 241 | 242 | 243 | Qt::Vertical 244 | 245 | 246 | 247 | 248 | 249 | 250 | PointingHandCursor 251 | 252 | 253 | + 254 | 255 | 256 | 257 | icons/zoom-in.pngicons/zoom-in.png 258 | 259 | 260 | 261 | 20 262 | 20 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | PointingHandCursor 271 | 272 | 273 | Fit Image to Canvas 274 | 275 | 276 | ... 277 | 278 | 279 | 280 | icons/enlarge2.pngicons/enlarge2.png 281 | 282 | 283 | 284 | 20 285 | 20 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | PointingHandCursor 294 | 295 | 296 | - 297 | 298 | 299 | 300 | icons/zoom-out.pngicons/zoom-out.png 301 | 302 | 303 | 304 | 20 305 | 20 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | QFrame::Plain 314 | 315 | 316 | Qt::Vertical 317 | 318 | 319 | 320 | 321 | 322 | 323 | PointingHandCursor 324 | 325 | 326 | Undo 327 | 328 | 329 | ... 330 | 331 | 332 | 333 | icons/undo2.pngicons/undo2.png 334 | 335 | 336 | 337 | 20 338 | 20 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | PointingHandCursor 347 | 348 | 349 | Clear All 350 | 351 | 352 | ... 353 | 354 | 355 | 356 | icons/loop2.pngicons/loop2.png 357 | 358 | 359 | 360 | 20 361 | 20 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | PointingHandCursor 370 | 371 | 372 | Redo 373 | 374 | 375 | ... 376 | 377 | 378 | 379 | icons/redo2.pngicons/redo2.png 380 | 381 | 382 | 383 | 20 384 | 20 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | QFrame::Plain 395 | 396 | 397 | Qt::Horizontal 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 0 408 | 0 409 | 410 | 411 | 412 | background-color:white 413 | 414 | 415 | 416 | QFrame::Box 417 | 418 | 419 | QFrame::Plain 420 | 421 | 422 | 1 423 | 424 | 425 | 0 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 5 440 | 441 | 442 | 443 | 444 | 445 | 9 446 | 447 | 448 | 449 | PointingHandCursor 450 | 451 | 452 | Qt::StrongFocus 453 | 454 | 455 | false 456 | 457 | 458 | background-color: black; /* Blue */ 459 | padding:10px; 460 | color:white; 461 | 462 | 463 | Open Folder 464 | 465 | 466 | false 467 | 468 | 469 | false 470 | 471 | 472 | false 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | Sans Serif 481 | 10 482 | 50 483 | false 484 | true 485 | 486 | 487 | 488 | Qt::LeftToRight 489 | 490 | 491 | background-color:white 492 | 493 | 494 | QFrame::Box 495 | 496 | 497 | QFrame::Sunken 498 | 499 | 500 | 1 501 | 502 | 503 | List of Images 504 | 505 | 506 | Qt::AutoText 507 | 508 | 509 | Qt::AlignCenter 510 | 511 | 512 | 4 513 | 514 | 515 | -1 516 | 517 | 518 | 519 | 520 | 521 | 522 | background-color:white 523 | 524 | 525 | QFrame::Box 526 | 527 | 528 | QFrame::Plain 529 | 530 | 531 | QListView::Batched 532 | 533 | 534 | 20 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 0 548 | 0 549 | 800 550 | 21 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | --------------------------------------------------------------------------------