Rebar Addon for FreeCAD
PopUpImage.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 # ***************************************************************************
3 # * *
4 # * Copyright (c) 2017 - Amritpal Singh <amrit3701@gmail.com> *
5 # * *
6 # * This program is free software; you can redistribute it and/or modify *
7 # * it under the terms of the GNU Lesser General Public License (LGPL) *
8 # * as published by the Free Software Foundation; either version 2 of *
9 # * the License, or (at your option) any later version. *
10 # * for detail see the LICENCE text file. *
11 # * *
12 # * This program is distributed in the hope that it will be useful, *
13 # * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 # * GNU Library General Public License for more details. *
16 # * *
17 # * You should have received a copy of the GNU Library General Public *
18 # * License along with this program; if not, write to the Free Software *
19 # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
20 # * USA *
21 # * *
22 # ***************************************************************************
23 
24 __title__ = "PopUpImage"
25 __author__ = "Amritpal Singh"
26 __url__ = "https://www.freecadweb.org"
27 
28 
29 from PySide import QtCore
30 from PySide import QtGui
31 from PySide import QtSvg
32 import FreeCADGui
33 import os
34 
35 class PopUpImage(QtGui.QDialog):
36  def __init__(self, img):
37  QtGui.QDialog.__init__(self)
38  self.image = QtSvg.QSvgWidget(img)
39  self.setWindowTitle(QtGui.QApplication.translate("RebarTool", "Detailed description", None))
40  self.verticalLayout = QtGui.QVBoxLayout(self)
41  self.verticalLayout.addWidget(self.image)
42 
44  """ showPopUpImageDialog(image): This function will show a given image in a pop-up
45  dialog box."""
46  dialog = PopUpImage(img)
47  dialog.exec_()
def showPopUpImageDialog(img)
Definition: PopUpImage.py:43
def __init__(self, img)
Definition: PopUpImage.py:36