def show(self):
     self.fill()
     self._window.show()
     centerWindow(self._window)
     self._window.raise_()
     self._window.exec_()
     self._window.hide()
 def show(self, msg):
     self._label.setText(msg)
     self._vbox.adjustSize()
     self._window.adjustSize()
     self._window.show()
     centerWindow(self._window)
     self._lastshown = time.time()
     while QtCore.QEventLoop().isRunning():
         QtCore.QEventLoop().processEvents(QtGui.QEventLoop.AllEvents)
 def show(self):
     self.fill()
     self._vbox.adjustSize()
     self._window.show()
     centerWindow(self._window)
     self._window.raise_()
     self._window.activateWindow()
     self._window.exec_()
     self._window.hide()
     self.enableDisable()
     return self._changed
    def show(self):
        self.fill()
        self._result = False
        self._treeview.adjustSize()
        self._window.show()
        centerWindow(self._window)
        #self._window.activateWindow()
        self._window.raise_()
        self._result = self._window.exec_()
        self._window.hide()

        result = []
        if self._result == QtWidgets.QDialog.Accepted:
            iter = 0
            while iter < self._treeview.rowCount():
                item = self._treeview.itemAt(iter, 0)
                print "ITEM:",item
                if item.checkState() == QtCore.Qt.Checked:
            	    result.append(item.text(1)) 
                iter += 1

        return result
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self, parent)

        self.setWindowIcon(QtGui.QIcon(getPixmap("smart")))
        self.setWindowTitle(_("Change Summary"))
        self.setModal(True)
        self.resize(520, 250)
        #self.setMaximumSize(QtCore.QSize(520, 400))
        self.setMinimumSize(QtCore.QSize(520, 300))
        #self.setMinimumSize(500, 350)
        centerWindow(self)
        
        self._vbox = QtWidgets.QVBoxLayout(self)
        self._vbox.setContentsMargins(5, 5, 5, 5)
        self._vbox.setSpacing(5)

        # Label summary
        self._label = QtWidgets.QLabel(self)
        # Label style start
        self._label.setGeometry(QtCore.QRect(20, 220, 490, 35))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self._label.sizePolicy().hasHeightForWidth())
        self._label.setSizePolicy(sizePolicy)
        self._label.setMinimumSize(QtCore.QSize(490, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("FreeSans"))
        font.setPointSize(11)
        font.setBold(False)
        font.setWeight(50)
        self._label.setFont(font)
        self._label.setCursor(QtGui.QCursor(QtCore.Qt.WhatsThisCursor))
        self._label.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self._label.setFrameShadow(QtWidgets.QFrame.Raised)
        self._label.setLineWidth(2)
        self._label.setWordWrap(True)
        self._label.setMargin(7)
        self._label.setIndent(0)
        self._label.setObjectName(_fromUtf8("_label"))

        # Label style end

        self._vbox.addWidget(self._label)

        self._pv = QtPackageView(self)
        #self._pv.getTreeView().header().hide()
        self._pv.setExpandPackage(True)
        #self._pv.setExpandAll()
        self._pv.show()
        self._vbox.addWidget(self._pv)

        self._lineLabel = QtWidgets.QLabel(self)
        self._lineLabel.setGeometry(QtCore.QRect(10, 250, 500, 10))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self._lineLabel.sizePolicy().hasHeightForWidth())
        self._lineLabel.setSizePolicy(sizePolicy)
        self._lineLabel.setMinimumSize(QtCore.QSize(500, 1))
        self._lineLabel.setMaximumSize(QtCore.QSize(16777215, 10))
        self._lineLabel.setMouseTracking(True)
        self._lineLabel.setToolTip(_fromUtf8("Information"))
        self._lineLabel.setWhatsThis(_fromUtf8("We will apply this changes on sytem..."))
        self._lineLabel.setLayoutDirection(QtCore.Qt.LeftToRight)
        self._lineLabel.setFrameShape(QtWidgets.QFrame.HLine)
        self._lineLabel.setFrameShadow(QtWidgets.QFrame.Plain)
        self._lineLabel.setLineWidth(1)
        self._lineLabel.setText(_fromUtf8(""))
        self._lineLabel.setAlignment(QtCore.Qt.AlignCenter)
        self._lineLabel.setWordWrap(False)
        self._lineLabel.setMargin(0)
        self._lineLabel.setIndent(0)
        self._lineLabel.setObjectName(_fromUtf8("_lineLabel"))
        self._vbox.addWidget(self._lineLabel)

        # Size Label

        self._sizelabel = QtWidgets.QLabel("", self)
        
        # Size Label Style start
        
        self._sizelabel.setGeometry(QtCore.QRect(10, 250, 500, 35))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self._sizelabel.sizePolicy().hasHeightForWidth())
        self._sizelabel.setSizePolicy(sizePolicy)
        self._sizelabel.setMinimumSize(QtCore.QSize(500, 20))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("FreeSans"))
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self._sizelabel.setFont(font)
        self._sizelabel.setCursor(QtGui.QCursor(QtCore.Qt.WhatsThisCursor))
        self._sizelabel.setMouseTracking(True)
        self._sizelabel.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self._sizelabel.setFrameShadow(QtWidgets.QFrame.Plain)
        self._sizelabel.setLineWidth(2)
        self._sizelabel.setWordWrap(True)
        self._sizelabel.setMargin(5)
        self._sizelabel.setIndent(0)
        self._sizelabel.setObjectName(_fromUtf8("_sizelabel"))
        # Size Label Style end

        self._vbox.addWidget(self._sizelabel)

        self._confirmbbox = QtWidgets.QWidget(self)
        layout = QtWidgets.QHBoxLayout(self._confirmbbox)
        layout.setSpacing(10)
        layout.addStretch(1)
        #self._confirmbbox = QtGui.QWidget(self)
        #self._confirmbbox.setGeometry(QtCore.QRect(20, 210, 351, 80))
        #self._confirmbbox.setObjectName("widget")
        self._confirmbbox.setMinimumSize(QtCore.QSize(500, 50))

        self._vbox.addWidget(self._confirmbbox)

#        self.frame = QtWidgets.QFrame(Dialog)
#        self.frame.setGeometry(QtCore.QRect(10, 230, 361, 61))
#        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
#        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
#        self.frame.setObjectName("frame")

        self._okbutton = QtWidgets.QPushButton(_("OK"), self._confirmbbox)
        self._okbutton.setGeometry(QtCore.QRect(10, 10, 90, 26))
        self._okbutton.setObjectName(_fromUtf8("_okbutton"))
#        self._okbutton.setGeometry(QtCore.QRect(10, 20, 90, 26))
        self._okbutton.clicked[()].connect(self.accept)
        self._cancelbutton = QtWidgets.QPushButton(_("Cancel"), self._confirmbbox)
        self._cancelbutton.setGeometry(QtCore.QRect(110, 10, 90, 26))
        #self._cancelbutton.setGeometry(QtCore.QRect(110, 20, 90, 26))
        self._cancelbutton.setObjectName(_fromUtf8("_cancelbutton"))
        self._cancelbutton.clicked[()].connect(self.reject)

        self._closebbox = QtWidgets.QWidget(self)
        layout = QtWidgets.QHBoxLayout(self._closebbox)
        layout.setSpacing(10)
        layout.addStretch(1)
        self._vbox.addWidget(self._closebbox)

        self._closebutton = QtWidgets.QPushButton(_("Close"), self._closebbox)
        self._closebutton.clicked[()].connect(self.close)