maxscheurer / pycontact

Analysis of non-covalent interactions in MD trajectories
https://pycontact.github.io/
GNU General Public License v3.0
51 stars 12 forks source link

Add info buttons to the input fields #10

Closed maxscheurer closed 7 years ago

maxscheurer commented 7 years ago

For non-intuitive input fields, let's implement kind of an Information system (like in QwikMD). We can make a subclass like:


class PicButton(QAbstractButton):
    def __init__(self, pixmap, parent=None):
        super(PicButton, self).__init__(parent)
        self.pixmap = pixmap

    def paintEvent(self, event):
        painter = QPainter(self)
        painter.drawPixmap(event.rect(), self.pixmap)

    def sizeHint(self):
        return self.pixmap.size()

and give it an info button icon... Then open a QMessageBox to display further information, citations, etc...

maxscheurer commented 7 years ago

Probably just messes up the nice GUI...